How to manage styles per API?

Hi everybody,


i would like to know if it is possible to replace per API the styles of existing DFT documents by styles of a template DFT document or from a given material file?

Kind regards,
Wolfgang Kunert -

Re: How to manage styles per API?


which styles are you going to copy? LinearStyles, DimensionStyles, DashStyles, etc...?


AFAIK, there is no direct API to copy any styles from one document to another, so my advice is to recreate/modify the styles in the new document with exactly the same properties like your template document.

Re: How to manage styles per API?



thank you for answering.


I need to achieve the same functionality via API as an user can do by using interactively the style organizer: Copy defined styles from a defined template DFT document or from a defined material.mtl file into the current opened DFT document.


Adding a new DrawingStyle to the opened DFT document is supported by the API, as you mentioned, but recursively taking over all objects from the equivalent source DocumentStyle seems to be quite messy and time consuming (=expensive) to program/realize. I hoped to find in the API a way to assign whole objects.


Here the help info for using the style organizer interactively, what i would like to implement without user interaction:

Step 1.

Choose View→Style→Styles.

Step 2.

On the Style dialog box, set the Style Type box to the type of style you want to organize.

Step 3.

On the Style dialog box, click the Organizer button.

Step 4.

On the Style Organizer dialog box, click the style in the File Name list that you want to copy.

Step 5.

Click the Copy button.

Kind regards,
Wolfgang Kunert -