Property definition Source

Hello,
I’m trying to load property set definitions from JSON files.
I’m using the AutoCAD_Python_PSet_CREATE_PropertySetDefinitionsByJSON.dyn ,
But this does not seem to include the ‘source’ of the property definition.
In my example this is pointing to a list definition.
I tried adding this to the pset_utils to add in the ‘Source’, but that did not work.
How can I get the ‘Source’ to come along?
thanks,

@ErDeWe welcome to the forum. The Source derives from a List. The first version of the Python file I’ve shared with the product team did not include this capability. Did you use the more recent one I’ve shared on the forum?

1 Like

Thank you Paolo for your response
I tried with the one you shared here:

I see in the code indeed has List functionality added but unfortunately I cant get it to run,
I tried using this one to make the json dump firtst, but I get a ModuleNotFound error.
ModuleNotFound

It will have to be tweaked to be compatible with CPython, it is a known issues, some of the Python syntax that used to work in IronPython is not compatible with CPython, fyi @Michael_Kirschner2

2 Likes

Oke, thanks for that info

Thanks you for your help on this so far.
I got the dump dyn to work with switching to CPython, and that give me a json with the lists.
But if I try the create from json dyn with this the lists are not being made and the ‘Source’ in style manager is empty.
If I test the utils code in the pset_utils ‘def create_ps_definitions_json(jsonpath):’
the jpsd.Lists stays empty and jpd.List is null.
my guess is it isn’t reading this list info from the json trough the civil_decoder?