Hello Everyone
I am trying to create Expression Syntax Definitions to calculate Length, Width, Height (XYZ) when attaching item types to existing cells/elements.
So far ,XYZ values have been difficult to automatically define in item types.
https://communities.bentley.com/products/microstation/b/microstation_blog/posts/ec-expressions-in-item-types---new-in-microstation-connect-edition-update-12
The above link gives some handy information and a list of pdf syntax. However I cannot see anything suitable to generate XYZ data.
For example RAW dgn data shows the below for a cell:
Here is an example expression for volume
this.GetElement().GetDisplayValue("Volume")
Is it possible to do something similar with XZY values? Or use the RAW data (Range Low) minus (Range High)?
Thanks
one thing i noticed that. if the Range Low Z value is negative, its having some issues with this expression this.GetElement().RangeLow.Z doesnt automatically update when the element has been changed or shortened in length.
Hi,
rold said:its having some issues with this expression this.GetElement().RangeLow.Z doesnt automatically update when the element has been changed or shortened in length.
can you share an example?
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan, attach is a screen recording. I just made a cylinder and item type to report rangeLowZ. but as you can see in the video it doesnt automatically update
rold said:attach is a screen recording
Thanks, it is really descriptional
Regards,
Hello rold,
I noticed Stuart Travis's expression has a space char between RangeLow and .z. This space char is very important.
It seems a bug but in current version, it is important. I tested on coming MSCE-U17, this bug has fixed. with space or without space all work well.
Yongan.Fu said:I noticed Stuart Travis's expression has a space char between RangeLow and .z
Good catch!
Regards, Jon Summers LA Solutions
Jon Summers said:Good catch!
MSCE-U17 fixed this issue. We can use .x, .y and .z without prefixed space character in itemtype expression.