Cunha Posted July 17, 2015 Share Posted July 17, 2015 (edited) How to put in a list, the first, the last and all the other points from entity obtaineds with the DIVIDE command? Edited July 17, 2015 by Cunha Quote Link to comment Share on other sites More sharing options...
ReMark Posted July 17, 2015 Share Posted July 17, 2015 AutoCAD pre 2000? How pre are we talking? First guess.....DATAEXTRACTION command. Many options available. Can output to two or more file formats depending on the version of AutoCAD being used. Second guess.....the LIST command. Using this option will give you the X, Y and Z coordinates of each point. Copy/paste the information presented in your text window (F2). Quote Link to comment Share on other sites More sharing options...
Cunha Posted July 17, 2015 Author Share Posted July 17, 2015 AutoCAD pre 2000? How pre are we talking? First guess.....DATAEXTRACTION command. Many options available. Can output to two or more file formats depending on the version of AutoCAD being used. Second guess.....the LIST command. Using this option will give you the X, Y and Z coordinates of each point. Copy/paste the information presented in your text window (F2). >>>>>>>>>>>>>>> First answer: I don't know how to explain it better, I asked how to form a variable containing the list of points. Second answer: There is no way to use Copy/Paste to hundreds of points. Extra answer: The AutoCad is R14 but I think it makes no difference for AutoLisp (in this specific case). Thanks for help. >>>>>>>>>>>>>>> Quote Link to comment Share on other sites More sharing options...
ReMark Posted July 17, 2015 Share Posted July 17, 2015 Guess I missed the part where you asked "how to form a variable". Perhaps you should have posted in the AutoLISP forum for starters. This is the Student Questions forum (as in help with homework and assignments). So now you are asking for a lisp routine that will extract the point information. Is that correct? And what exact information are you looking for? One possible solution can be found here...http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-point-data-calling-all-lisp-gurus/td-p/885377 Another possible solution can be found here...http://www.cadtutor.net/forum/showthread.php?9628-Export-Points I'm sure you can find other custom lisp routines that will accomplish the same task if you try. Quote Link to comment Share on other sites More sharing options...
tzframpton Posted July 17, 2015 Share Posted July 17, 2015 Sounds to me like this is a LISP question. Cunha, I believe, is wanting to create a list using AutoLISP from points using Divide. This thread may need to be moved to the appropriate forum. I will flag it so the poster can get help. Quote Link to comment Share on other sites More sharing options...
Cad64 Posted July 17, 2015 Share Posted July 17, 2015 I think ReMark's links should help, but in case further assistance is needed, I've moved this question to the AutoLisp section: http://www.cadtutor.net/forum/forumdisplay.php?21-AutoLISP-Visual-LISP-amp-DCL Quote Link to comment Share on other sites More sharing options...
David Bethel Posted July 17, 2015 Share Posted July 17, 2015 (edited) First record the last entity ( including sequential ) prior to calling DIVIDE : [b][color=BLACK]([/color][/b]defun c:div [b][color=FUCHSIA]([/color][/b]/ le ss pl[b][color=FUCHSIA])[/color][/b] [color=#8b4513];;;RECORD THE LAST ENTITY[/color] [b][color=FUCHSIA]([/color][/b]setq le [b][color=NAVY]([/color][/b]entlast[b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]while [b][color=NAVY]([/color][/b]entnext le[b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]setq le [b][color=MAROON]([/color][/b]entnext le[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [color=#8b4513];Then DIVIDE[/color] [b][color=FUCHSIA]([/color][/b]setvar [color=#2f4f4f]"CMDECHO"[/color] 1[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]command [color=#2f4f4f]"_.DIVIDE"[/color][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]while [b][color=NAVY]([/color][/b]> [b][color=MAROON]([/color][/b]getvar [color=#2f4f4f]"CMDACTIVE"[/color][b][color=MAROON])[/color][/b] 0[b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]command pause[b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [color=#8b4513];;;Gather the POINT or INSERT Entities created by DIVIDE[/color] [b][color=FUCHSIA]([/color][/b]if [b][color=NAVY]([/color][/b]setq le [b][color=MAROON]([/color][/b]entnext le[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]progn [b][color=MAROON]([/color][/b]setq pl nil ss [b][color=GREEN]([/color][/b]ssadd[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]while le [b][color=GREEN]([/color][/b]setq pl [b][color=BLUE]([/color][/b]cons [b][color=RED]([/color][/b]cdr [b][color=PURPLE]([/color][/b]assoc 10 [b][color=TEAL]([/color][/b]entget le[b][color=TEAL])[/color][/b][b][color=PURPLE])[/color][/b][b][color=RED])[/color][/b] pl[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]ssadd le ss[b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]setq le [b][color=BLUE]([/color][/b]entnext le[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]setq pl [b][color=GREEN]([/color][/b]reverse pl[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [color=#8b4513];;;PICKSET ss [b][color=FUCHSIA]([/color][/b] to ERASE or whatever [b][color=FUCHSIA])[/color][/b][/color] [color=#8b4513];;;POINT LIST pl[/color] [b][color=FUCHSIA]([/color][/b]prin1 pl[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] Because DIVIDE creates point entities, all of the lists in pl are WCS. No error traps included. -David Edited July 19, 2015 by David Bethel Add PICKSET ss Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 18, 2015 Share Posted July 18, 2015 The other way to go is to create the points using a lisp not divide this way you can do 1 object at a time including a pline. The code that is close is "chainages along a pline", you would have to amend it to either create points or just make a list of points. Search here. David ; error: bad argument type: lentityp nil ? Quote Link to comment Share on other sites More sharing options...
David Bethel Posted July 18, 2015 Share Posted July 18, 2015 Thanks BigAl, Fixed ! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 19, 2015 Share Posted July 19, 2015 Nice david could use it to make a list of objects like during a multiple offset. Quote Link to comment Share on other sites More sharing options...
David Bethel Posted July 19, 2015 Share Posted July 19, 2015 I use something similar for CAMERA and TARGET paths in walkthru animations. -David Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 19, 2015 Share Posted July 19, 2015 David very good example did a spiral stair once took a little while. Quote Link to comment Share on other sites More sharing options...
Cunha Posted July 20, 2015 Author Share Posted July 20, 2015 Hi tzframpton, thanks for attention. I am traying to undestand and rewrote an old rotine I wrote decades ago. The pourpose is to flat aluminum sheet for aircraft construction. I think you is right. If you have time tell me what is "flag the post". Thank you. Best regards, Cunha. Quote Link to comment Share on other sites More sharing options...
Cunha Posted July 20, 2015 Author Share Posted July 20, 2015 Hi David, thank you very much for clear commentary and the routine. I will try to understand it (maybe in some weeks) and will send you a feedback. Best regards, Cunha. Quote Link to comment Share on other sites More sharing options...
Cunha Posted July 20, 2015 Author Share Posted July 20, 2015 Hi Bigal, thanks for reply. I have not informed that the divide command is over polylines 3d, so I think your suggestion will not works (to me). Even so I thank you very much. Best regards. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 20, 2015 Share Posted July 20, 2015 In 2013 3dplines are supported as a divide option. Did you check your pre 2000. Else you will need to search for a "3dpline insert points" lsp etc, they are out there, I dont have one. Quote Link to comment Share on other sites More sharing options...
Cunha Posted July 21, 2015 Author Share Posted July 21, 2015 In 2013 3dplines are supported as a divide option. Did you check your pre 2000. Else you will need to search for a "3dpline insert points" lsp etc, they are out there, I dont have one. Ok BIGAL, thanks. David posted a great routine, I think this literally killed the riddler. Best regards, Cunha. Quote Link to comment Share on other sites More sharing options...
Cunha Posted July 21, 2015 Author Share Posted July 21, 2015 Great! Davi. A kind of illogical logic but it works! This will be very useful for me. My lisp is a machete near your scalpel ! Quote Link to comment Share on other sites More sharing options...
David Bethel Posted July 21, 2015 Share Posted July 21, 2015 You're quite welcome. -David 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.