Cycle through project drawings - Plant 3D

Cycle through project drawings - Plant 3D

deusextechnic
Advocate Advocate
718 Views
2 Replies
Message 1 of 3

Cycle through project drawings - Plant 3D

deusextechnic
Advocate
Advocate

Hi, 

 

 

 

I am looking for a tested and safe way to open all drawings in turn in a project and cycle through them using the .net API. If I use the standard OPEN command, I am running into project integrity issues (Project may eject the drawing for no apparent reason) .

 

I have seen Autodesk.ProcessPower.ProjectManagerUI class suggested but can't seem to see any documentation for it anywhere. 

 

I am limited to Plant3D 2019. 

 

Specifically for now, I need to run PLANTAUDIT on all drawings so if there is an alternative approach, that would be appreciated as well. 

 

Already posted on the plant forum. Just seeing if there is any more input from here. 

0 Likes
Accepted solutions (1)
719 Views
2 Replies
Replies (2)
Message 2 of 3

BlackBox_
Advisor
Advisor

I don't use Plant 3D, so assuming that PLANTAUDIT is a native Command, why not just use Core Console to execute a Script on multiple drawings in parallel? 

 

If you want to start the batch process from within Plant 3D, using the active Profile when calling Core Console, after selecting the desired Script, this may help: 

 

https://forums.augi.com/showthread.php?172630-Assign-Layer-State-to-Viewport&p=1339054&viewfull=1#po...

 

 

If you prefer to start this from Windows Explorer, you'll need to create a custom context (Shell) menu that does same.

 

Core Console isn't just able to run Scripts with native Commands; you can also NETLOAD your custom assemblies, and invoke those CommandMethods as well, etc.

 

HTH


"How we think determines what we do, and what we do determines what we get."

Chris (BlackBox) Bradley
Managing Partner / Developer / Civil Designer
Quux Software | Sincpac C3D | Style Explorer

0 Likes
Message 3 of 3

deusextechnic
Advocate
Advocate
Accepted solution

Thanks for the reply. This helped indirectly. After talking to ADSK support, this is the solution I eventually settled on:

 

var docs = Application.DocumentManager;

DocumentCollectionExtension.Open(docs, dwg.AbsoluteFileName, false);

document.CloseAndSave(dwg.AbsoluteFileName);

 

 

0 Likes