Rename Document Styles

Hello Everyone,

How can I rename Document Styles?

1 Like

Hi @Mohd,

I don’t know of any nodes that will do this (yet). You’d need to look into the StylesBase and StylesRoot classes in the Civil 3D API. Is that something you’re comfortable with?

No. I’m not expert in Civil 3D API. Could you please help me with that.

Thanks in Advance.

@Mohd take a look at the Camber package.

SetName

1 Like

Instead of making a new topic, I would rather reply here, as I want to create a script doing the following:

  • Find styles with specific name in the working opened document.
  • Replace the found styles with another name.

I was successful in achieving the first as shown.

DOCUMENT_STYLE_FIND.dyn (16.7 KB)

However, I can’t find a way grabbing/selecting those found styles, in order to use the “Style.SetName” Camber node.

I know that it’s applicable in C3D, since Sincpac toolset extension has a dedicated command for the above-mentioned workflow.

Any solution/update guys?

@mzjensen
I tried to rename multiple styles using your node “Style.SetName” but I can’t find the correct input for that node with the data I get from “DocumentExtensions.GetDocumentStyles”

Sorry, Patrick…unfortunately it won’t work to mix-and-match with Civil 3D Toolkit nodes :confused:

I thought that it might be the issue but hope is the last that is left for the engineer :wink:

Any improvement on this procedure?