Hey guys, I fond this code and changed it to create section planes from lines.
(defun c:mksectionp ( / ss i )
(prompt "\nSelect lines to create section planes: ")
(setq ss (ssget (list (cons 0 "LINE")))
i 0)
(while (setq obj (ssname ss i))
(setq p1 (vlax-curve-getendpoint obj))
(setq p2 (vlax-curve-getstartpoint obj))
(setq v1 '(0 0 1));Plane Vector - (0 0 1) is straight up
(setq *acad* (vlax-get-acad-object));Get the ACAD object
(setq *ad* (vlax-get-property *acad* 'ActiveDocument));Get the Active Document
(setq *ms* (vlax-get-property *ad* 'ModelSpace));Get the Model Space
(setq section-object (vlax-invoke-method *ms* 'AddSection (vlax-3d-point p1)(vlax-3d-point p2)(vlax-3d-point v1)))
(setq i (1+ i))
)
(princ)
)
I have been searching in google and in forums, but I have not found a way to pass these sections to block (like using the "sectionplanetoblock" command), with the help of a lisp, without the dialog box showing up to configure it, and several planes at a time.
I read that there is a function "vla-GenerateSectionGeometry" but nowhere can I find information on how to use it or what parameters to set.
I wonder if any of you know how this can be accomplished?