Getting list of Object Styles for Imported Objects

I would like to get access to a list of Object Styles entries in Dynamo. At this stage I do not want to edit, just check if any entries exist in the “Imported Objects” pane, as per image (attached).

imported

 

 

 

 

I’m guessing this needs a new Python node to be built - has anyone done anything like this before? Thanks for your help.

All right Mr. Johnson,

Finally Andreas is sleeping so I can answer a question for you. :slight_smile: LOL.

Here’s the deal. Imported Object Styles that you are looking to identify don’t really have a unique identifier within bigger Graphics Styles container so it makes it a little tricky to get them out of there. They supposedly all belong to OST_ImportedObjectStyles Category but a filter set up like that fails to return anything. I went the brute force way which might seem a little weird, but it gets the job done. I am assuming that all imported categories are coming from DWG files which gives them an extension *.dwg in their name. You probably noticed that. :slight_smile: Imports in Families is a default one that will be there whenever you open a project with imported stuff or start a fresh one. It might be empty or it might have some stuff in it. I am giving you two ways to get those imported categories:

  1. If you know the full name of the category and want only contents of that one particular one use method one:

way2

 

  1. If you don’t know the name but you are guessing like I did that they came from CAD and thus will carry a *.dwg extension in their name, use method two to get all Imported Categories that have that string in their name. Warning, results might be overwhelming if you have a lot of imports. :slight_smile: Just saying.

way1

 

1 Like

Nice one, Konrad. Glad I was asleep.

It works beautifully, thank you so much Konrad. After typing your code out manually (which helped me understand Python a bit more :slight_smile: I was able to test the various options and also build a bit more wrapping to make it work in my environment. See image below… and thanks again!

object styles tests

Hello,

I am new to Dynamo, please excuse my lack of experience, and by default some of my sillier questions.

Is it possible to edit this method to return a list of object styles that were not imported into the project.

I need to extract the Object Styles for the categories (& subcategories) used in a client template. This client requires the list of categories, line weight, color and line pattern.

I am under the impression they will want to modify this list and push it back into the template, could this be done?

Thanks for the Help

Elyse

Elyse,

Please post this question as a new thread. This is an old question, but given previous forum limitations no one was able to know that it was even asked. Also, its better to post a new question in a new thread rather than hijacking an already existing one since title will not be very descriptive.

Can you share the python code please?The image is too small to see clearly.Ths

Hi @sg289

Create a New topic please. This topic is already solved. Thanks!

Hi Guys is there a way to see this on clear picture?

1 Like

can you please share e bigger pic? i can’t see anything.

Thank you :slight_smile:

1 Like

@Konrad_K_Sobon Do you know why I can not have none of the images in this post in their normal size? they are unreadable!

I have the same issue. can you please share the large size image. Otherwise this post would be useless!