How Can I open a plant 3D project with C#
I have tried this but it does not work:
string sProject = Path.Combine(ProjectPath.Text , "Project.xml");
PlantProject oProject = PlantProject.LoadProject(sProject, true, "", "");
The best way I've found is to send the commands to the command line (Pinvoke acedCommand) or use LISP. Set FILEDIA to zero and then you can pass a file name to the OPENPROJECT command.
You can build a result buffer and then call acedCommand.
Sorry! And haw can I get current project name, if I already opened it?
I need know current project name to load dot net libraries depend project.
And finaly I use LISP to load dot net. So I need LISP way.
I haven't seen any of the plant api exposing functions via LISP. So you are much better of using the .Net api directly. If needed, you can build a dll that references .Net code, and make your own functions exposed to Lisp.
You can get project name information by referencing the project part dll in the installation directory.
Make sure you install the plant 2013 sdk as well.
Thank you for reply! OK I will try to use .Net, but... really... it's too long way opposite simply a couple of LISP strings for this purpose.
Start with some of our most frequented solutions to get help installing your software.
The AutoCAD P&ID forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.