This is my first time in trying to create an Item Type. It is simple in its complexity. I want to assign a 'name', a 'area', and a 'length' to a shape. All in MicroStation CONNECT Update 17.
I created the Item Type, as shown in the image (below).
For The Area...Type=NumberUnits=acres [acres]Expression=this.GetElement().Area
For The Length...Type=NumberUnits=ft (US Survey) [foot (US Survey)]Expression=this.GetElement().length
I then assigned ('Attach Item' tool) the Item Type to the sample shape element.
However, the "Label_DA" information does not reflect the values of the sample shape, as shown further up in the Properties dialog.
I'm not sure what I am doing wrong.
Internal name of area property is *EnclosedArea. Check link
this.GetElement().EnclosedArea
Answer Verified By: Richard Tarntino
Richard Tarntino said:I want to assign a 'name', a 'area', and a 'length' to a shape
A shape element already has geometric properties. Creating an Item Type property of the same name is needless duplication.
See this example that reports shape metrics — no Item Types were harmed in this demo!
Regards, Jon Summers LA Solutions
Leonard,
Thank you for the guidance. Got t to work. As mentioned, this is my first interaction. with the 'nuts & bolts' of Item Types. Will be doing this more and more.
Jon,
I see what you are posting. And have checked the link. In time, I will be working more and more with Item Types. It is an area of learning that I want to expand. My problem is that I manage five different DOT Configurations for our company. Sometimes, I just have to pursue the most expedient method. I will be looking more closely at your linked information, in the future. Thanks.
Some good examples of Item Type expressions here