Vedgard Posted July 26, 2013 Share Posted July 26, 2013 (edited) Dear Lisp Masters, I need help to do this: 1 - Insert a Multileader with a user defined block - OK, no problem. 2 - Pick to place block - OK, no problem. 3 - Pick to place arrow - OK, no problem. So far so good, then a lisp capable of: 4 - Pick to select a polyline. 5 - Collect some info from polyline such as width, lenght, layer, vertices coodinates (x,y,z) etc. 6 - Pick to select a Multileader 7 - Insert the collected info into the block attributes values. It's possible to do that? Greetings from Portugal!!! Edited July 26, 2013 by Vedgard Quote Link to comment Share on other sites More sharing options...
TheyCallMeJohn Posted July 26, 2013 Share Posted July 26, 2013 (edited) Vedgard, First of all I am by now means a CAD master. However, my recommendation would be to add a leader to the dynamic block that has attribute lines for what you need. I attached a s screen shot of similar one I used. Then using visual lisp you should be able to pull out the information and update the block information. Some sources to reference Afralisp.net: If you look under the visual lisp section you should be able to learn how to pull out the information from the polyline. http://www.theswamp.org/index.php?topic=22663.0 : There is some coding written here for updating attribute that I find very useful. putdynpropvalue, getdynprops, getdynpropvalue Written and tweaked by I think by Jeff Mishler, Steve Doman, Herman Mayfarth and Tony Tanzillo Edited July 26, 2013 by TheyCallMeJohn Forgot to add the picture. Quote Link to comment Share on other sites More sharing options...
Vedgard Posted July 26, 2013 Author Share Posted July 26, 2013 TheyCallMeJohn, Thanks for your repply!!! I'd made some changes in my needs. What I need is a LISP to do the following: 1. select polyline. 2. select block (see attach). 3. Insert info in block attributes. LD_PLNAME - from polyline layer name PH_ELEC_CDC CFO, all characters starting from right to left until first underscore, so LD_PLNAME would be "CDC CFO". LD_PLWIDTH - polyline width. C_NGFC - sum of UD_NGF+UD_OCDCHIGHT. LD_COORDS (it's a multiline attribute)- polyline X,Y,Z coordinates from vertices and midpoints If this can be donne, I'll export this info to an excel file. ETIQ_CDC.dwg 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.