Jump to content

Pipe Network Renaming LISP


broncos15

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

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