I want to create some plugins that create signals or component properties for selected components through csv files. This can speed up the production of some components.
At the moment, I have some challenges on my side. I need some help. Thank you!
ctrete Signal by list.zip (1.9 KB)
ctrete Property by list.zip (2.0 KB)
ctrete Property by list.csv (177 Bytes)
ctrete Signal by list.csv (102 Bytes)
Hi! Friend. I updated it once, V1.1, but I still don’t seem to have success. Didn’t create the signals and properties I wanted. How should I modify it?
ctrete Property by list v1.1.zip (2.0 KB)
ctrete Signal by list v1.1.zip (1.9 KB)
Friends. Do you have a better way?
I’ve looked at your program and it’s a bit confusing, you say you are trying to add properties and signals (forgive me for only looking at your add property code right now) but I see that in your code about adding properties you are using findBehaviour and createBehaviour which are behaviors and not properties, what you should be using is getProperty and createProperty, that’s one thing, also, I see that you didn’t call the generator function addProperty either, which would lead to nothing happening, the code stops at the end of ImportFromCSV() doesn’t it, and then, you said that you want to generate it in the selected component, then the comp that you’re getting should be of the type vcComponent instead of vcContext, you can use vcHelpers.Selection module to get the currently selected component, that’s all I’ve read so far, you can modify it first.
Thank you very much! I copied the code from ImportSignalbyList.py, maybe I forgot to change it. You’re absolutely right. I did get stuck on the selected component. I ended up not knowing how to connect any of the components I chose to create signals and properties. I’ll look at your hints.
ctrete Signal by list v1.2.zip (1.9 KB)
ctrete Property by list v1.2.zip (2.0 KB)
I made some adjustments, but it still seems to lack a bit of syntax to implement.
emmm, I didn’t understand what you wrote, I’ll give you my revised version for your reference and use.
ImportPropertybyList.py (5.9 KB)
Thank you. With your help, I have completed both.