I’m trying to write a python script that changes selected dimensions to be measured from the layout space.
I can find out what detail dimensions have been measured from using:
def dimensionMeasureSpace(dimension):
DimensionRef = Rhino.DocObjects.ObjRef(dimension)
DimensionObj = DimensionRef.Object()
Dimensionbase = DimensionObj.AnnotationGeometry
detail = Dimensionbase.DetailMeasured
return detail
If the dimensions are measured from the layout space the function returns an empty guid “00000000-0000-0000-0000-000000000000”. Otherwise it returns the guid of the detail they are measured from.
I would like to set the DetailMeasured property to an empty guid.
def dimensionMeasureSpaceLayout(dimension):
DimensionRef = Rhino.DocObjects.ObjRef(dimension)
DimensionObj = DimensionRef.Object()
Dimensionbase = DimensionObj.AnnotationGeometry
Dimensionbase.DetailMeasured = "00000000-0000-0000-0000-000000000000"
This returns the error “Message: expected Guid, got str”
Thanks.
dimensionMeasureSpace.py (1.8 KB)