Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi
Do you know a way to get the project path of a given sandbox from the information contained in the project.pj file?
I had an heuristic like this:
If second line contains port information then parse 5th line like explained below.
This is the case for the sandbox root.
Use File:1.8
- atgrzas071:7001 /Controls/project.pj ÿÿÿÿ 29108/project.pj ÿÿÿÿ DRE0002/project.pj ÿÿÿÿ AVLab_m/project.pj
+ Ãsandbox.attribute._mks_sparse=false,sandbox.attribute._mks_scope=any,sandbox.attribute._mks_shared=false,sandbox.attribute._mks_lineterminator=native,sandbox.attribute._mks_compute_checksums=true
?€y Ç /%æX €
> AVLab_m/project.pj */Controls/29108/DRE0002/AVLab_m/project.pj
...
Else parse second line.
Example:
Use File:1.8
> doc/project.pj ./Controls/29108/DRE0002/AVLab_m/doc/project.pj
The parsing of the given line can be done by looking for the string between the 2 project.pj ( tok=regexp(line,'/project.pj(.*/project.pj)','tokens');).
Unfortunately I encountered 1 project.pj that looks like this:
Use File:1.8
- atgrzas071:7001 /Controls/project.pj ÿÿÿÿ 31361/project.pj ÿÿÿÿ ARE2043/project.pj ÿÿÿÿ Functions/project.pj ÿÿÿÿ LamSp/project.pj ÿÿÿÿ LamSpBas/project.pj
> LamSpBas/project.pj +/PSL/CmbEng/LamSp/AA000/LamSpBas/project.pj
! #sandbox.attribute._mks_sparse=false
! Gsandbox.attribute._mks_sparse=false,sandbox.attribute._mks_shared=false
! tsandbox.attribute._mks_sparse=false,sandbox.attribute._mks_shared=false,sandbox.attribute._mks_lineterminator=native
+ £sandbox.attribute._mks_sparse=false,sandbox.attribute._mks_shared=false,sandbox.attribute._mks_lineterminator=native,sandbox.attribute._mks_compute_checksums=false
?€y Ç /%æX €
` doc/project.pj
` label/project.pj
` mdl/project.pj
` mdl_test/project.pj
` src/project.pj
` src_test/project.pj
_
”§K =§Aþè
1.6 $(projectdir)/LamSpBas.AVLab
Any generic rule known how Integrity builds the project.pj and inference rule how to get the project path out of it (better than my guessing?).
Many thanks
Kind regards
Thierry
(Of course I could get the project information easily via CLI and Integrity connection but my goal here is to avoid having to connect to Integrity to get it)
Solved! Go to Solution.
Hi Thierry,
You could try the "si sandboxes" command since it does not require a server connection. What you will see is output similar to below:
c:\Sandbox\BestNewProjectEver\project.pj -> /BestNewProjectEver/project.pj (SERVERNAME:PORT)
The first part before the arrow is the sandbox location, the part after the arrow is the Integrity project the sandbox is built from, and the last bit is the server info. Looking at the binary project.pj is often difficult and time consuming, so I would avoid it if possible.
Hi Thierry,
You could try the "si sandboxes" command since it does not require a server connection. What you will see is output similar to below:
c:\Sandbox\BestNewProjectEver\project.pj -> /BestNewProjectEver/project.pj (SERVERNAME:PORT)
The first part before the arrow is the sandbox location, the part after the arrow is the Integrity project the sandbox is built from, and the last bit is the server info. Looking at the binary project.pj is often difficult and time consuming, so I would avoid it if possible.
Thank you very much for the hint.