07-03-2018 01:51 AM - edited 07-03-2018 01:52 AM
07-03-2018 02:00 AM
Dear GerdW,
But the subvi do not have a file name.
07-03-2018 02:06 AM - edited 07-03-2018 02:06 AM
07-03-2018 02:45 AM
Hello,
I need to rename the Main VI and SubVIs.
Based on your method, only can rename the Main VI, the subVIs are just copied to a new destination.
Why I need do this work, because sometimes I need to modify the the subvi in different projects.
07-03-2018 03:04 AM
Hi kisyou,
Based on your method, only can rename the Main VI, the subVIs are just copied to a new destination.
Once the mainVI with it's own set of subVI is in its own location you can rename the subVIs (after putting all together in a project)!
sometimes I need to modify the the subvi in different projects.
This sounds wrong to me: you need to copy a whole hierarchy of VIs because you need to edit some subVIs down below?
There are surely better methods to solve such problems! (One of them would be to use some OOP architecture…)
07-03-2018 03:10 AM
Hi kisyou,
Yes, I did.
I did that in a project where different VI's with their subVIs are saved in separate libraries (I called them Objects).
The duplicator "DuplicateObjectsMain.vi" is very sophisticated and it owns to my company so I am not allowed to publish it here. It takes too much time to detach the code and make it a separate one which I can publish here.
I can say the basic principle is to use references to each project item (object library) then manipulate them.
I think have spent more than one full week 8 hours per day to get it running.
It is a lot of effort and you should analyze first if it has sense to do it.
In our case it was useful because so called objects are parts of the big sequencer program which control different hardware devices (power supplies, oscilloscopes, signal generators, ....and so on...). To be able to use two or more same devices it was necessary to duplicate their code. Each object device contains in its library hundred of drivers so it is very hard to rename all of them manually 🙂
Anyway it was a lot of work....