DetailMeasured Property

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)

I guess you want to do this:

Dimensionbase.DetailMeasured = System.Guid.Empty

(you need to import System)

Thanks!

Unfortunately it doesn’t seem I’m able to modify “Dimensionbase.DetailMeasured” this way. I don’t get an error, but I can’t modify the dimension either

dimensionMeasureSpace.py (2.2 KB)