The following code will find all blocks created by sectionplane objects:
(defun GetAllSectionBlockInsertions(SectionEname / blocks blockname blockdef pair)
;;Get the section block ename
(setq
Blocks (vla-get-blocks (vla-get-activedocument(vlax-get-acad-object)))
BlockName (cdr (assoc 2 (entget (cdr (assoc 331 (entget (cdr (assoc 360(entget SectionEname)))))))))
BlockDef (entget (vlax-vla-object->ename (vla-item blocks BlockName)))
)
(mapcar
(function
(lambda(pair)
(cdr pair)
)
)
(vl-remove-if-not
(function
(lambda(pair)
(= 331 (car pair))
)
)
BlockDef
)
)
)
Now I'm looking for a way to find the sectionplane object given the block it created.
Any pointers?