This example shows how to determine the solid that was sectioned to create a crosshatch object.
ENTITY/object, solidNUMBER/objsub, respSTRING/name(30)$$crsmod = &VWCURS&VWCURS = &ANY$$$$ set selection mask for Drafting Aids (type 25)MASK/25$$start:$$ select objectIDENT/'Select Crosshatch', object, respIF/resp <= 2, JUMP/finish:$$$$ deduce object subtypeobjsub = &SUBTYP(object)$$ ensure the object is a Crosshatch (subtype 6)IFTHEN/objsub == 6$$ find the Solid that was sectioned to create the Crosshatchsolid = &SXHSOL(object, IFERR, errdo:)$$ a NULENT means an associated solid could not be foundIF/solid == &NULENT, JUMP/errdo:name = &NAME(solid)PRINT/'The name of the sectioned Solid is', nameELSEMESSG/'A Crosshatch was not selected.'ENDIFJUMP/start:$$errdo:MESSG/'The Crosshatch is not associated to a sectioned Solid.'JUMP/start:$$finish:&VWCURS = crsmodHALT