jan_ek Posted February 19, 2014 Share Posted February 19, 2014 Please help. I would like to using Lisp to create section. Point and depth specified in the code. Name - "section1" Type - Valume Live Section - Yes Is it possible ? Quote Link to comment Share on other sites More sharing options...
MSasu Posted February 20, 2014 Share Posted February 20, 2014 What is that "section"? A cut trough a solid entity? A sketch? An entity of a vertical product (i.e. Autodesk Mechanical)? I think that you should provide more information on your project; a picture will help a lot, too. Quote Link to comment Share on other sites More sharing options...
jan_ek Posted February 20, 2014 Author Share Posted February 20, 2014 (edited) I want to create an object that is shown on the screenshot above.This is autocad 2007 Autocad Command "SECTIONPLANE". I would like to create by "entmake". Edited February 20, 2014 by jan_ek Quote Link to comment Share on other sites More sharing options...
Hippe013 Posted February 20, 2014 Share Posted February 20, 2014 It is possible. I would recommend that you invoke the 'AddSection Method on the model space rather than use entmake. The process is pretty straight forward and then you wouldn't have to figure out what dxf codes you would need to modify. I have shown just some rough code to get you started. (setq p1 (getpoint "\nSelect first point:")) ;First Point of your section (setq p2 (getpoint "\nSelect second point:"));Second Point of your Section (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))) ;Invoke the addsection method - Arguments is first point - next point - plane vector (All as variants) Use (vlax-dump-object section-object T) to see what properties you need to edit. Hope this helps! Quote Link to comment Share on other sites More sharing options...
jan_ek Posted February 22, 2014 Author Share Posted February 22, 2014 (edited) Thank you for your suggestion.It helped .(never used the VLisp) I have one problem, how to get a list of intersections and delete one of them. Edited February 22, 2014 by jan_ek Quote Link to comment Share on other sites More sharing options...
Hippe013 Posted February 24, 2014 Share Posted February 24, 2014 You will have to explain in more detail as to what you want to delete. In the mean time you may want to look into the "intersectwith" method. regards, Hippe013 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.