Jump to content

How create SECTIONOBJECT


jan_ek

Recommended Posts

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 ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

3dsection.jpg

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 by jan_ek
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 by jan_ek
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...