How to use an environment variable in the SmartComponent XML?
Hi,
We are building and sharing SmartComponents, but they currently have paths in the XML files which are user local. We want to replace them by "%LocalAppData%\ABB\DistributionPackages" but, when compiling, it seems to convert these paths into "C:\Program Files (x86)\ABB\RobotStudio 2022\ABB Library\Components\%LocalAppData%\ABB\DistributionPackages".
Is there any way for it to properly use the existing environment variables when expanding these paths?
Thanks and best regards,
Hugo Costelha
We are building and sharing SmartComponents, but they currently have paths in the XML files which are user local. We want to replace them by "%LocalAppData%\ABB\DistributionPackages" but, when compiling, it seems to convert these paths into "C:\Program Files (x86)\ABB\RobotStudio 2022\ABB Library\Components\%LocalAppData%\ABB\DistributionPackages".
Is there any way for it to properly use the existing environment variables when expanding these paths?
Thanks and best regards,
Hugo Costelha
Tagged:
0
Comments
-
Hello there,
Which XML-files are you referring to?—Maxim RiabichevPC Software Support Engineer0 -
Hi,
I am referring to the XML file used for configuring a Smart Components when we are building one using the RobotStudio SDK.
Best regards,
Hugo Costelha0 -
Can you show an example of what you wish to achieve, in the XML?—Maxim RiabichevPC Software Support Engineer0
-
Hi Maxim,
For instance, we have some SmartComponents built by use that use RoboStudio provided components, which, ini that case, we use somethin like this:[...] <GraphicComponents> <EmbeddedLibrary source="%ABBLIBRARY%\Components\VolumeSensor.rslib" name="in_place"> [...]
In this case, the "%ABBLIBRARY%"
However, we have some SmartComponents built by us that also use other components built by us. In these case, the XML is usually something like this:[...] <GraphicComponents> <EmbeddedLibrary source="C:\Users\marce\Documents\RobotStudio\Libraries\MecanismoVisao.rslib" name="MecanismoPeca" /> [...]
In these cases, we want to use something like this:<GraphicComponents> <EmbeddedLibrary source="%LocalAppData%\ABB\DistributionPackages\SistemaVisao.rslib" name="SistemaVisao">
However, when loading the SmartComponent, it expands to something like this:C:\Program Files (x86)\ABB\RobotStudio 2022\ABB Library\Components\%LocalAppData%\ABB\DistributionPackages\SistemaVisao.rslib
Thanks in advance for your help.
Regards,
Hugo0 -
I checked with R&D and it turns out that LibraryCompiler doesn't support environment variables.
Maybe it could be possible to edit the PIM.xml post-compilation, in the rslib package?
—Maxim RiabichevPC Software Support Engineer0 -
Maxim Riabichev said:I checked with R&D and it turns out that LibraryCompiler doesn't support environment variables.
Maybe it could be possible to edit the PIM.xml post-compilation, in the rslib package?
We have tried that, but it does not work, it also is unable to process environment variables. Of course we can change it to the full path of the current user, but we were looking for a more streamlined process.
So, is there any way how we can refer to modules which are not in the RobotStudio installation, but on a users' folder, such as "%LocalAppData%\ABB\DistributionPackages\SistemaVisao.rslib"?
Thanks and regards,
Hugo Costelha0 -
Not at this time.
I'll ask around to see what would be the best way forward.—Maxim RiabichevPC Software Support Engineer0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings