Jump to content
Developer Wiki and Function Reference Links ×

Automated renaming


Recommended Posts

Hi

 

anybody willing to help me with the following task:

 

task 1:

 

replace the "room id" of all „layout rooms“ placed on a design layer by using the names of  the design layer according to their stacking order.

 

have a look at the example file.

so when there are 200+ design layers it is a lot of copy/paste work to do.

 

task 2:

 

setting up sheet layers according the same syntax like above (properties are not important )

to have 203 sheet layers with the naming coming from the design layers

 

example01.vwx

Link to comment

Numerous questions:

 

1.  Will the "room id" always be numeric 1 to XXX when the script it run?

2. Will the location of the layout rooms always be horizontal left to right when the script is run?

3. You have 203 layout room object and 203 layers, but three of those layers are Schematic, Rack Elevation, and Rack 3D Layout. Do you really want layout rooms for those layers?

4. Will the Design Layers always be named with a sequential number on the end when the script is run?

5. Stacking order of both the layout rooms and the design layers? Or numeric room id and layer stacking order?

6. Will you ever have layers that you don't want included in the assignment?

7. Do you want they layout rooms put on the Design Layer that matches the room id?

8. What do you want the sheet layers to be? IE how do you want them named? Same as the Design Layer with a prefix or suffix? You can't use the same name for both a Design Layer and Sheet Layer.

 

The more information you provide about what you really need the more likely you are to get someone to help. And the less likely you are to piss them off by coming back and saying "no that is not what I needed."  I don't mind helping on something like this, but it can't be an open ended thing where you keep coming back and asking for "oh, please add this also."

Link to comment

Hi Pat

 

thank you for numbering the questions 😉 and thank you so much for taking my post with you.

 

1. yes (this will be part of a template file)

2. yes (this will be part of a template file)

3. you are absolutely correct. maybe it is possible to set a range of the design layers that will be used to rename the "rooms". the count of 203 is only an example. sometimes it will be less, most of the time more than a thousand

4. yes (this will be part of a template file)

5. never thought that it is possible to connect those two pieces of data. that idea of corresponding would be nice.

6. yes (like Rack elevation, Rack 3D Layout cause they are essential to make the "plug-in" connectcad work properly)

7. no (internal "plug-In" rules)

8.  example sheet number: 0001 to XXX / sheet title: same as the design layer

 

Thank you very much for your effort and the investment of time to help me. I hope I didn't upset anyone in the past.

 

 

Link to comment

So, it sounds like what you would really like is a script that will ask for the number of Rooms, Create Design Layers for each Room + the 3 ConnectCAD layers,  insert that number of symbols on the first Design Layer, Name the Rooms so they match the Design Layer names, Create a sheet layer for each design layer numbered from 1 (4 decimal places) to the number of Design Layers the the Sheet Layer title matching the design layer name.  

 

Should the Sheet Layer also have a viewport showing the matching Design Layer data?

Link to comment

Crazy. That sounds too good to be a reality. Or am I simply underestimating the possibilities of knowledge paired with programming?

Obviously I do!

 

Of course, creating a viewport within this process sounds very tempting. But is that feasible? Or is the way via a script simply an unsolvable task?

 

Link to comment

Depending on what you need the viewports to do, creating them via script can be very easy, or quite challenging, but definitely doable.

 

If all you need is a viewport showing the matching design layer, with maybe a drawing border, that is easy. If you need to have layer and class overrides for all 100+ layers (and however many classes) with specific layers visible, then much more challenging.

 

On a basic level, what would you like the viewport on Sheet 0001 to show?

  • Like 1
Link to comment
14 hours ago, Pat Stanford said:

 

If all you need is a viewport showing the matching design layer, with maybe a drawing border, that is easy. 

That‘s absolutely fine. What has to be done by hand is placing sheet boarder and setting up the sheet format matching the drawing I gues. 
maybe it is possible to have an blank sheetlayer with an existing sheet boarder in the template file to use as mother. 
showing all layer and only the one and only Design Layer inside the viewport is fine when working within connectcad. 

Link to comment
  • 3 weeks later...
  • 1 month later...

Thanks for the file.  I would have never understood the question without it 😁.

 

If I understand correctly, you want to set the Device Name to be the origin name_layer name_a number

 

What is the origin name?  Where does that come from?

 

By number, do you mean you want that number to increment, or be the total number of devices on the layer?

Link to comment
  • 1 month later...

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