Jump to content

Export line points and rectangle points to Notepad


structo

Recommended Posts

Hi all,

 

i want layer description, start point coordinate, end point coordinates. and rectangles layer description, bottom left point coordinate and top right coordinates to note pad. please have a look for format of notepad.

 

example for one line data is: Line "Layer1" "45.56,0.23" "45.56,2.56"

Here "Line" is type of object, Layer name=Layer1, Start point of line is=45.56,0.23 and End Point of line is="45.56,2.56"

 

For Rectangle Data: Rec "Layer3" "45.49,0.12" "45.72,0.50"

 

Here Rec is Rectangle object, Layer name=Layer1, Bottom Left Rectangle corner point is45.49,0.12 , Top right Rectangle corner point is 45.72,0.50.

 

please solve by lisp.

 

Thanks.

Output format.txt

export line rec points.dwg

Link to comment
Share on other sites

Good time to learn lisp. Any good lisp book will give you all the answers, what you want is the basics of getting information about an object, google assoc 10 & assoc 11 or vla-get-startpoint, vla-get-endpoint. Also assoc 8, assoc 0. Lastly "write-line"

 

Just look at the code samples here at Cadtutor for any that have "entsel" there are just so many examples.

 

Also a rectangle object does not exist it becomes a pline with 4 points but its easy to get the corners.

 

; copy these two lines to the command line 1 at a time and pick a line.
(setq obj (entget (car (entsel "Pick line"))))
(setq stpt (assoc 10 obj))

Link to comment
Share on other sites

Stucto, i would suggest to look at the entopo routine on the site of Lee Mac. As a matter of fact, for any lisp question i would start there in any ways..

Link to comment
Share on other sites

Halam,

Thank you for reply. i need export those points to notepad and same notepad should be used for developing drawing by notepad output. is this possible by lisp?

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...