Can anyone tell me why this returns None on a dimension?
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select a dimension", 512)
if obj:
dimstyle = rs.DimensionStyle(obj)
print dimstyle
Thanks,
Dan
Can anyone tell me why this returns None on a dimension?
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select a dimension", 512)
if obj:
dimstyle = rs.DimensionStyle(obj)
print dimstyle
Thanks,
Dan
Hi Dan - checking it,…
works here so far… does it fail on any dim? Custom styles in play at all?
You can put a break point at the line
dimstyle = rs.DimensionStyle(obj)
and step into the code - it will go into dimension.py in the function DimensionStyle. if you now put a break point at the end of that function, you can see what’s what - assuming it gets there of course.
-Pascal
Hi Pascal,
It’s returning “None” whether it’s the default dimension style, or if I make a custom one. I followed your suggestion, but I’m not really seeing any issues. Not sure what I’m supposed to be looking for I guess.
I did notice that if I create a dimension, but don’t alter it in any way (like text size) that it works. As soon as I alter it, it returns “None”. Take a look:
Thanks,
Dan
Hi Dan,
Indeed this function is not working properly when a property has changed.
Thanks for reporting
RH-41642 is fixed in the latest WIP
Just tried my script again with the new build and it worked well.
Thanks for this fix.
Dan