The Peer to Peer PDM Application is provided as open source code. Feel free to use it in any way you wish. I have endeavored to highlight certain functionality deficiencies and no guarantees as to the quality of the code or the principle are implied.
The Application comprises a series of pieces:
Creo App: Copy the App files
I’ve provided the application core as a zip file.
Creo App: If required recompile App to Support Creo Parametric 2.0
The download contains precompiled code for Creo 3 only.
Platform: Install node.js
Node.js is an evented io platform that is open source, free, easy to use and powerful. Peer to Peer PDM relies on it to form the general application logic.
Platform: Install GIT
GIT is the world’s leading distributed version management system. Invented by the Linux team, improved over the last 15 years, it dominates Software development workflows especially in open source teams. Peer to Peer PDM relies on it to form the back end. In many ways Peer to Peer PDM is simply a skin over GIT.
System: Check Hosts file specifies localhost to be 127.0.0.1
The code requires the IP address is 127.0.0.1 for security reasons.
System: Internet Explorer Security Settings
The Creo UI pieces of the Peer to Peer Solution at times reference Pro/Web.Link Code. This requires that the localhost is defined as a trusted site and also that trusted sites can run unsigned ActiveX controls. There are other options for users running Chromium Based Browser config.pro option, see PTC tech support.
If you do not do this at some points in the interactions with the App you will see this message from the webpage.
App: Setup Gitchill.js
Depending on where you installed GIT and the Peer to Peer app, you will need to edit GitChill.js such that the ‘configuration options’ make sense. Gitchill.js is the ‘main App’ based on clicks inside Creo, different URL’s are sent to the node app running this program and the program handles the logic of what to do per event.
App: Setup d:\peertopeer\p2ppdm.pro
App: Setup NodeStart.bat
The NodeStart batch file is used to start up the ‘server’ App to run the Peer to Peer UI. All we need to do is to ensure the various components of the commands in it are correct..
Test: Test the app starts with no problems
App: Adjust protk.dat if required
If you didn’t install to d:\peertopeer then you need to redirect the protk.dat file.
Creo: Adjust config.pro options
Some pages still have remnants of Pro/Web.Link in them (so in addition to setup of your IE security settings to enable that API just like you would for using any custom Pro/Web.Link app, you need to also add config options to enable the Pro/Web.Link API). We also need to reference the Peer to Peer Creo App path so that will start with Creo.
Test: Start Creo
Assuming the Creo side of the App is configured correctly a UI will result.
In a completely empty install there is no actual repository. The first thing to do is to Pick Initialize P2P Repo.
The Peer to Peer code calls GIT with a ‘create repository’ command. Based on the response back from that command, the UI is updated.
In a completely empty install there are no files. The first thing to do is add some files to the repository. Files get added to the repository from the Workspace. So if we didn’t start Creo in the Peer To Peer ‘workspace’ directory then we should change to that directory.
We create files as we would normally, storing them to the workspace folder on disk. For checking purposes just make a simple box and save it (Peer to Peer PDM works of files on disk, not files in memory).
The Peer to Peer code copies file to the repository, stages them and commits them based on your choices in the UI. Based on the response back from those commands, the UI is updated.
Create A Branch
In Peer to Peer working you will tend to make your changes in a ‘sandbox’ rather than immediately start changing the ‘master’ branch. The master branch convention being that it is the authoritative source of truth.
The Peer to Peer code executes a GIT command to create a new Branch based on your choices in the UI. Based on the response back from those commands, the UI is updated.
Make Changes, Add Files
In Design you tend to find your ideas are not linear. Branches are where we store those ideas while we are working on them.
Update In Session
WARNING: Currently you need to manually erase from memory and reopen. At some point the manual steps will be reworked so that they work when pressing this button. for now you have to do it manually.
You can have many branches, create another one.
As more and more branches are created, you’ll find the list available when switching gets longer. Just check the code is showing more than one branch.
Branch from a Branch
You don’t have to just create branches from the master, you can branch from any branch.
Continued in a linear fashion detailing out the design parts of interest…
As you commit more and more, you’ll sometimes wish to remind yourself what you did.
Branch from Historical Commit
If you wish to go back in time to fork to another idea, simply click on the commit you wish to go back to and pick Branch Commit.
And you may want to execute a bit of cleanup by deleting the temporary branch name we created
If you’ve managed to get this far, it is highly likely that you have got a working installation. Congratulations and I hope you find value in the idea. If you have any fixes or improvements made to the code which you’d like to propose and share, contact firstname.lastname@example.org and I’ll look into making a GIT Hub repository of the codebase for folks to fork.