question

Kari Payton avatar image
0 Likes"
Kari Payton asked Mischa Spelt commented

Is there an option to display x,y,z size values in Model view?

FlexSim 18.0.1
model view
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

I'm not sure what you're envisioning. Could you be more specific?

You can drag text objects into the model view and then tie them to the size values of an object, but the Quick Properties panel already displays those values live.

0 Likes 0 ·
Kari Payton avatar image Kari Payton Matthew Gillespie ♦♦ commented ·

yeah that's what i'm referring to. i meant if i could display them on each object instead of adding them manually. Like on a CAD drawing or 3D model you can "add dimensions" for objects. Make sense? @Matthew Gillespie

0 Likes 0 ·

1 Answer

Mischa Spelt avatar image
2 Likes"
Mischa Spelt answered Mischa Spelt commented

You could use the custom draw trigger to draw the dimensions next to the objects themselves.

In the attached model you'll find some old code that I "FlexSim 2018-ified". It could use some tweaking, mostly in the alignment of the texts, because getdrawtextmetric seems to behave differently than I expected and I didn't bother looking into that, but hopefully it'll give you the right idea.


showdimensions.fsm (24.2 KiB)
· 7
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Kari Payton avatar image Kari Payton commented ·

@Mischa Spelt thanks but I couldn't get it to work for objects where I changed the object's shape.

0 Likes 0 ·
Mischa Spelt avatar image Mischa Spelt Kari Payton commented ·

How do you mean? This code should work on any object - it does not use the shape, just the size of the bounding box (spatialsx, y and z).

0 Likes 0 ·
Kari Payton avatar image Kari Payton Mischa Spelt commented ·

i used the function object.size and it returned an array for the object on the left. But when i run your code it doesn't display the values like you see on the queue. @Mischa Spelt

0 Likes 0 ·
dimensions.png (368.1 KiB)
Show more comments