Copy Layer to Active Standard

Copy Layer to Active Standard

johnster100
Collaborator Collaborator
334 Views
2 Replies
Message 1 of 3

Copy Layer to Active Standard

johnster100
Collaborator
Collaborator

Hi,

i'm using iLogic to create some layers by copying an existing one. The layer copies but is not put in the 'Active Standard'. This means when I select the layer drop down list I do not see the layer unless i scroll to the bottom:

 

johnster100_0-1708968626455.png

 

Is there a way to add the new layer to the Active Standard so that the layer appears in list correctly? (this is what happens when I manually copy a layer through the styes editor.

 

thanks,

John

0 Likes
Accepted solutions (1)
335 Views
2 Replies
Replies (2)
Message 2 of 3

WCrihfield
Mentor
Mentor
Accepted solution

Hi @johnster100.  I do not think you will be able to do that by code.  When you manually go to the Manage tab, then click on the Styles Editor tool on the Styles and Standards panel to open the Style and Standards Editor dialog, then select the active Standard Style (its name will be in Bold text), then click on the Available Styles tab on the right, then click on Layers option under the Style Type list, you will see how you can include the Layers you want to have available when that main Standard style is active.  There does not appear to be any API way to do that yet.

 

We can set a specific Layer to be the default one for a specific type of drawing object by code though, if that Layer has already been included in that Standard style.

DrawingDocument.StylesManager.ActiveStandardStyle.ActiveObjectDefaults...

DrawingDocument.StylesManager 

DrawingStylesManager 

DrawingStylesManager.ActiveStandardStyle 

DrawingStandardStyle 

DrawingStandardStyle.ActiveObjectDefaults 

ObjectDefaultsStyle 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 3

johnster100
Collaborator
Collaborator

thanks a lot for the reply. Also thanks for the info on how to do it manually. I was not aware that's how it worked.

 

cheers,

John

0 Likes