Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SLICE 3D model n put FACE to 2D dwg

1 REPLY 1
SOLVED
Reply
Message 1 of 2
arshadmirza786
122 Views, 1 Reply

SLICE 3D model n put FACE to 2D dwg

Hi

A lisp in needed that SLICE 3D model and Put the FACE to a 2d View dwg

as sample dwg are attached

 

Thanks in advance

1 REPLY 1
Message 2 of 2
hosneyalaa
in reply to: arshadmirza786

try @arshadmirza786 

 

 

 

hosneyalaa_0-1733204548621.png

 

 

vl-load-com)
;; https://help.autodesk.com/view/OARX/2022/ENU/?guid=GUID-FB1253E1-770C-4685-8EE4-81D241F405D8
(defun c:Example_SectionSolid()
    ;; This example creates a box in model space.
    ;; It then sections the box based on a plane
    ;; defined by three points. The section is returned
    ;; as a region.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; Define the box
    (setq center (vlax-3d-point 5 5 0)
          boxLength 5
	         boxWidth 7
	         boxHeight 10)
    
    ;; Create the box (3DSolid) object in model space
    (setq modelSpace (vla-get-ModelSpace doc))
    (setq boxObj (vla-AddBox modelSpace center boxLength boxWidth boxHeight))
    
    ;; Define the section plane with three points
    (setq sectionPt1 (vlax-3d-point 1.5 7.5 0)
          sectionPt2 (vlax-3d-point 1.5 7.5 10)
          sectionPt3 (vlax-3d-point 8.5 2.5 10))
    
    ;; Section the box
    (setq sectionObj (vla-SectionSolid boxObj sectionPt1 sectionPt2 sectionPt3))
    
    ;; Change the viewing direction of the viewport
    (setq NewDirection (vlax-3d-point -1 -1 1))
    (setq activeViewport (vla-get-ActiveViewport doc))
    (vla-put-Direction activeViewport NewDirection)
    (vla-put-ActiveViewport doc activeViewport)
    (vla-ZoomAll acadObj)
)

 

 

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report