cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ability to open Collaboration Projects via Command line or Script

Ability to open Collaboration Projects via Command line or Script

 

I thought it would be super easy to create a scheduled script for plant 3d to open, open a collab project, open a master model, save and close.

But after scouring the internet and AI, it isn't so easy. 

Why do this?

As a BIM admin, I need to keep my collab projects refreshed to all user changes so the FED models are always up to date. 

Yes, I have tried "Always Keep on this Device" and "Free up Space" but this only works for the ACC cache, and not the P3D BIM Collaboration Cache, which only refreshes on project open. 

 

There's 3 different ways you can open a P3D collaboration project (the Project Manager and 2 in the Start Page UI's), yet they all sit behind a different User interface with no connection to the normal P3D or Acad UI or controls. 

 

We can use the command line to send a project to become a Collaboration Project. 

So I don't see why its not possible to use the command line to open a collaboration project?

Eg.

-OPENCOLLABPRJCT

-HUB

-Project name

-P3D Project Name

-Model name

 

Or

-OPENCOLLABPRJCT

-Paste Model Path (Includes all of the above)

 

Or if anyone knows a bullet proof way to solve the collaboration cache sync problem, please sing out. 

Namely.

A way to designate a P3D collaboration Project, to auto sync the cache without needing to open the project in P3D.  

 

Cheers

Luke

 

 

4 Comments
jonathan.horvatH4QTK
Contributor

I have been automating the project selection and refresh by modifying this registry key (which expects a project xml path) and then launching a P3D session (which loads with the 'current' project and does a refresh on load), which I then blindly kill after 3 minutes. It usually only takes a few seconds, but since I am ending it blindly I am conservative with the timing.

This path pertains to Plant 3D 2026 but you can find equivalent path for your version:
[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R25.1\ACAD-9117:409\ProcessPower\CurrentProject]

This method is pretty light weight, but still would rather have an out of box utility for achieving this.

I hope this helps! Until (or if...) Autodesk gets around to adding this feature. There are a number of other features relating to project data which are "almost" suitable for automation but which have been implemented oddly as a sort of point-and-click adventure, and this is definitely one of them. Would love to see all the data manager functions operate from command line also.

luke.coxonUB8Z4
Contributor

Many Thanks @jonathan.horvatH4QTK 

 

So are you changing the path of the (Default) in the reg editor to path to your desired project? 

Then the script that runs P3D will default to open this project?

 

My problem is that my project is big with a web of XREFs, for the project to cache properly I need to physically open the master model inside the project, which forces the loading of all XREFs and, more importantly, forces the sync check and downloads revised XREFs to my local cache. 

 

Note: I ended up making a Power Automate UI automation which takes control of my mouse and physically opens P3D, loads collab project, opens master model, re loads all xrefs, zoom extents, save and close model, close P3D. 

It took a while to setup, but to my surprise it is pretty solid. 

Downside: I discovered that Windows 10/11 have now blocked users from waking PC via task scheduler. Nor can users prevent our PCs from sleeping, locking or hibernating in the power settings.

Yet Power Automate UI automations only work when the PC is awake?!??! Only allowing a UI automation while you are working on your PC totally defeats the purpose of it.

I looked into it and it appears to be an intentional move from Microsoft to force users to pay for a virtual machine in Azure, with an "unattended bot" setup. (Upwards of $7k to setup plus ongoing costs.)  

 

I ended up making a crude motorised bot on a timer to physically wake my PC at 4am with a key press and enter my pin 5min before the UI automation starts.

Got there in the end and I learnt a lot in the process. haha

 

jonathan.horvatH4QTK
Contributor

@luke.coxonUB8Z4 Hi Luke! Yes - sort of - i am changing the one which will appear selected / loaded when i launch P3D (which forces db sync for that proj when i launch P3D), but not changing anything relating to the "Default Project" they give us OOB. Sounds like this will only partially solve in your case - For the files I have been going through desktop connector, and for latest database i have been doing this sort of "cheaters refresh." It was a precarious thing to gather the files via Desktop Connector (EDIT: it seems better nowadays), and I still wouldnt recommend overwriting them this way, but to just read you should be OK using a combination of these two. This should get you latest files + latest db. Sadly, we are not allowed to run any scheduled tasks here, out of some alleged security concern, which I think is overblown. The only safe computer is one that has been unmade in the fires of Mount Doom. There are so many active 0days at any given time and in every level that it seems kind of counterproductive to knee-cap legitimate users from using legitimate features at potentially zero added security benefit in practice. It is the quintessential zero-sum game because you only gain security by taking away from utility, and gain utility by removing well-intended but overzealous security policies. I was able to just go ahead and write up a short scheduler that relies on batch scripts. I should have migrated this to C# or something by now but I seldom keep working on anything after it already does what I need haha

luke.coxonUB8Z4
Contributor

Thanks @jonathan.horvatH4QTK , i'll give it a try. This method will work for one project but not multiple. Maybe setting different projects as "default" on differing schedules would solve this? 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea