From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-11-2020 06:13 AM - edited 12-11-2020 06:21 AM
I have a project that have more class , so I dynamically obtain class by path.
I scan a folder , get all .lvclass, mapping name and get class what I want.
When build exe , I need include all subvi and class, I cannot have any "can modify code" in folder.
But if I include all , this dynamically obtain class will fail , it cannot scan file in .exe.
I was test , if use absolute path , it can work.
Example : [pwd]\Application.exe\OOP\Base Clase\Base Class.lvclass , this path for "Get LV Class Default Value VI" can working.
I think a folder map in exe same with project. Is it true?
How to scan folder map in exe?
Or have any mothed can auto scan and load class?
Solved! Go to Solution.
12-11-2020 04:09 PM
Not sure I understood your problem but if in executable you get errors when trying to dynamically load classes, make sure those clases are set to always included in build spec and set their destination outside of the exe (for example in the support directory).
12-11-2020 08:16 PM
If you build them into your executable (which does have a directory structure), then use the Current VI's Path to build a path to where the classes are.
What I do is build my classes into Packed Project Libraries (PPLs) and put them in a special directory. I use Application Folder to build a path to where the PPLs are and then use Get Exported File Path to get the exact path to the class inside of the PPL.
12-15-2020 09:48 PM
It's a answer, but I need include in exe.
And thank you response.
12-15-2020 09:52 PM
Packed Project Libraries can support my need .
I save my class in lvlibp , main code can search path in lvlibp.
And lvlibp can lock code , user cannot see it.
Thank you for you information!