Check drawing type using LISP

By Adam Nagy

You may want to find out if the drawing being loaded is an architectural drawing.
If the drawing was created in AutoCAD Architecture (or another vertical based on that like AutoCAD MEP) then it has additional entries in the NOD (Named Objects Dictionary) named like AEC_xxx, e.g. AEC_VARS.

You could rely on that dictionary entry to identify architectural drawings:

<

p style=”line-height: 140%;margin: 0px;font-family: Courier New;font-size: 8pt;color: black;background: white”>(defun printIsAecDrawing ( / )
  (if (= (dictsearch (namedobjdict) "AEC_VARS") nil)
    (princ "\nNot Architectural")
    (princ "\nArchitectural")
  )
)


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading