Problem.
Is there an expression to drill down to the child element (Profile) of an extruded solid? I want to report the Segment lengths of the profile as Length and Width of the solid.
For a very simple one level extruded solid, we can use expression this.GetElement().GetItem("SmartFeaturesSchema:Extrude").Distance to get the Distance.
For your three levels smart feature, need more investigation.
Nice!
It would be great if the user could select the property in the panel (red box) and right-click to get the expression.
You could then paste the expression into the Expression Builder or maybe directly into the Place Note tool?
Or maybe directly into the Table, so that you would not need to define an Item first?
dominic SEAH said:It would be great if the user could select the property in the panel (red box) and right-click to get the expression.
A real good idea. Suggest to file it in the MicroStation Ideas area.
done
Yeah this is a good suggestion. Or maybe somehow to a TEXT Datafield where the user can map a text in an element properties. Having both option would really help users that doesnt have dev background.
Hello Rold,
The below very complex expression can meet your requirement.
this.GetElement().GetItem("SmartFeaturesSchema:SmartFeatureContainer").GetRelatedInstance("SmartFeatureToCellParametersRelationship:1:ShapeElement").Segments[0].Length
Dgn file attached here:
ItemTypeExpression4ParametricSolid.dgn
GetRelatedInstance format:
GetRelatedInstance("relationshipClassName:dir:relatedClassName[, PropertyName:FailureValue]")
dir=0: forward, dir=1: backward
Hi Fu,
Thanks for sending this through, i really appreciate it. I tried it with a circular shape but im not sure if im getting the correct expression. do you know what expression should be use to grab the information below .
Here it is. Sorry for missing your post.
this.GetElement().GetItem("SmartFeaturesSchema:SmartFeatureContainer").GetRelatedInstance("LeafElementToSmartFeatureElementRelationship:1:EllipseElement").PrimaryAxis
I have the same exact problem but on my situation the segment i would like to get is two levels deep (theres another solid that was substracted). I would like to get the segment of the shape circled below:
7230.Test.dgnUploaded the file
Cheers,
Cris
Hello Fu, or anyone who knows about this.
I've also trying to develop an expression as yours, but I dont know how to change the SmartFeatureSchema to another feature on the same level of the tree.
I mean, your expression allows to access the first one which are the shapes cutting my object, being the shape that extrude the object placed in the second place
I dont know if this is a basic question but knowing how to move at the same level of the tree will be very useful for me
Thanks in advance.
ORD 2022R3 ORDL 2022R3 LumenRT 16.17.59.94 Synchro 06.05.01.05
No way till now. We can just get the first one at a level by using ItemType expression.