Referencing model dimension value in layout space

When you draw a dimension in layout space snapped to a model space object, it will display the model space dimension. I have tried to access the value using rs.DimensionValue(), but this returns the layout space distance. Is there a way to get the model space dimension either in python or Rhinocommon? I can get the text of it using rs.DimensionText() but I need the actual number.

Maybe I’m not understanding what you’re saying but it seems that DimensionValue should return what you want:

import rhinoscriptsyntax as rs

d = rs.GetObject("pick dimension", 512)
v = rs.DimensionValue(d)
print "val:{0}, type:{1}".format(v, type(v))

What am I missing?

Hi Alain,

Thanks for the response. When drawn in Layout space, DimensionValue returns the value of the dimension in layout space. I have setup a layout dimensioning objects in model space, where the model space scale is not the same as the layout space scale, say 1/4" = 1’. My dimensions in layout space are snapped to the model space objects, and display the model space length when using the default “<>” in the user text, however when I use rs.DimensionValue() it returns the distance in layout space, which in my example would be 48 times smaller than the model space object. Is there a way to obtain this model space dimension when in layout space through rhinoscript? The text field “<>” has no problem with it.

Hi John,

There’s something not right here. Dividing by DetailScale(detail_view_id) seems like it would work but if you later change the scale setting your calculation will be off. This area is being reworked in Rhino 6. Sorry I don’t have a good answer. Your best option may be to redo your dimensions in model space.

I noticed that too trying to find a workaround. Thank you for looking into it!