Itemp Type: How to get the Level Description?

Hi 

Based on another thread in this forum, I found out the actual level on an element can be added to an ItemTypes using following expression:

this.GetElement().GetDisplayString("Level")     

That's great!

However, I'm new to Expression Builder and need a hint or at least to know if it would possible to get the "Level Description" and not jsut the Level name.

Any idea?

Re Mikkel

Parents
  • Hi Jon
    It is not the Level Name I am after but the Level Description, as that, in my case, contains relevant information I need to export to IFC via Item types and iTwin.

    Is it a two step process? I mean, can I get the Level Description if I know the Level Name using expression?

    Fra: Jon Summers <bounce-DE0601D9-CA2E-4005-A7B3-982ABAEE9AEB@communities.bentley.com>
    Sendt: Monday, March 28, 2022 6:48:54 PM
    Til: MicroStationForum@communities.bentley.com <MicroStationForum@communities.bentley.com>
    Emne: RE: [MicroStation Forum] Itemp Type: How to get the Level Description?
     
    Update from Bentley Communities
    Jon Summers

    I found out the actual level on an element can be added to an ItemTypes

    Please tell us what you want to achieve.  Why do you want to 'add the actual level on an element to an ItemType'?

    If you're writing a Report, then you can already add level info...

    View online

     

    You received this notification because you subscribed to the forum.  To unsubscribe from only this thread, go here.

    Flag this post as spam/abuse.

    At Atkins - member of the SNC-Lavalin Group, we work flexible hours around the world. Although I have sent this email at a time convenient for me, I don't expect you to respond until it works for you.

    NOTICE – This email message and any attachments may contain information or material that is confidential, privileged, and/or subject to copyright or other rights. Any unauthorized viewing, disclosure, retransmission, dissemination, or other use of or reliance on this message or anything contained therein is strictly prohibited and may be unlawful. If you believe you may have received this message in error, kindly inform the sender by return email and delete this message from your system. Thank you.

  • It is not the Level Name I am after but the Level Description, as that, in my case, contains relevant information I need to export to IFC. Is it a two step process? I mean, can I get the Level Description if I know the Level Name using expression?

    I think you're on the right track.  Given a level name, it ought to be possible to look up its description in the DGN file's level table.  But what that Expression should be I don't know.  Something along these lines, but this is conjecture...

    this.GetDgnFile().Levels.FindLevel (this.GetElement().Level).GetDescription()

    Notes

    this.GetElement().Level gets the element's level name.

    I can't see how to obtain a level description.  For example, Expression Builder tells me that this is OK, but in practise yields no result...

    this.GetElement().ActiveFile.Levels(this.GetElement().Level)

    Perhaps  can help?

    You might want to inquire with our programming forum

    I think a solution using an Expression would be the best result.  A programmatic approach is overly-complex and not open to most users.

     
    Regards, Jon Summers
    LA Solutions

Reply
  • It is not the Level Name I am after but the Level Description, as that, in my case, contains relevant information I need to export to IFC. Is it a two step process? I mean, can I get the Level Description if I know the Level Name using expression?

    I think you're on the right track.  Given a level name, it ought to be possible to look up its description in the DGN file's level table.  But what that Expression should be I don't know.  Something along these lines, but this is conjecture...

    this.GetDgnFile().Levels.FindLevel (this.GetElement().Level).GetDescription()

    Notes

    this.GetElement().Level gets the element's level name.

    I can't see how to obtain a level description.  For example, Expression Builder tells me that this is OK, but in practise yields no result...

    this.GetElement().ActiveFile.Levels(this.GetElement().Level)

    Perhaps  can help?

    You might want to inquire with our programming forum

    I think a solution using an Expression would be the best result.  A programmatic approach is overly-complex and not open to most users.

     
    Regards, Jon Summers
    LA Solutions

Children
No Data