When adding a Project Parameter to a Project, I would like to check if a parameter with that name already exists, if it is instance or type, what unit type, what categories it is bound to, etc. If it does exist, meets my requirements, and is not yet bound to the category I need, I want to add a Category for it instead of creating a double parameter. I found some examples by @Jeremy_Tammik, see below.
I’m having some problems translating these examples to Python. @Andreas_Dieckmann did give me a head start with the new Document.ProjectParameters Node from Clockwork, but I’m not quite there yet.
instance = 
iterator = doc.ParameterBindings.ForwardIterator()
instance.append(iterator.Key.GetType() != typeof( InstanceBinding //results in the error that ‘typeof’ is not defined.
instance.append(iterator.Key.GetType() is InstanceBinding //results in all trues.
It would seem I am in over my head here. Any help?
Or should I just add it as an Issue for the Parameter.CreateProjectParameter Node? It does tend to create surplus parameters as it is now.