broncos15 Posted March 10, 2016 Share Posted March 10, 2016 I had a question in regards to renaming pipe structures and pipes. I am trying to write a LISP that would rename pipes and structures based on their parent alignments. It would work similar to the AeccRenamePipeNetworkParts command, except that it would allow the user to rename them. I am running into two different issues when I try and do this. 1)When I dump the VLA information for the structure, the information comes out as gibberish Alignment = #<VLA-OBJECT IAeccAlignment 00000000520dcf20> The actual name of the Alignment is something like Storm C. 2)How would I have the user select the first and last connected object, then have it increment along the entire connected objects to rename it? I know that I will need to use vla-put-name and then some form of strcat, but besides that I am lost. I have never coded pipe networks before, which is why I am little concerned (they are finicky and I don't want to screw them up using LISP). Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 10, 2016 Share Posted March 10, 2016 Post a drawing to play with. dump of a road alignment has "Displayname" name of alignment ; DisplayName (RO) = "CL-LIP" Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 10, 2016 Share Posted March 10, 2016 C3DPipeNetworkRules.zip Dont know if this will help its from 2013 ignore title its all pipe network sample stuff Quote Link to comment Share on other sites More sharing options...
broncos15 Posted March 10, 2016 Author Share Posted March 10, 2016 Attached is a drawing showing what I am talking about. Thank you so much for the help with this BigAl, I really appreciate it. Also, that pipe network rules is super interesting. I haven't ever .net programming in CAD before, so it was cool to look at how it works. Storm Pipe Test.dwg Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 11, 2016 Share Posted March 11, 2016 I googled and ended up on the autodesk website under developers guide help, The older versions 2011 2012 etc had some good samples, it may be part of the custom install to add samples as I could not find in 2016 but was on an older 2013. Quote Link to comment Share on other sites More sharing options...
broncos15 Posted March 11, 2016 Author Share Posted March 11, 2016 Thanks again BigAl for the help. As a workaround to my first item I am planning on just having the user select the alignment so that I can get the alignment name. One thing that I think would be really cool is for the user to select the upstream and downstream structures they want relabeled. The code would then rename all the structures that are between them as well that are in a line. For example if I selected MH1 and MH4 and there was MH2 and MH3 between the selections, it would rename MH1, MH2, MH3, and MH4. Do you have any ideas of how that could be done? 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.