AutoCAD Plant 3D Forum
Welcome to Autodesk’s AutoCAD Plant 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Plant 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Autocad Plant3D - 2011 - Test German Version

1 REPLY 1
Reply
Message 1 of 2
hoangvuminh
280 Views, 1 Reply

Autocad Plant3D - 2011 - Test German Version

Hi all ,

 

I want to develop a net assembly for Autocad Plant3D - 2011 - Test German Version. When i tried to access the PnpTable with name "PnPDrawings" so that i can get information of the drawings. But i can not get it do you know how ?

1 REPLY 1
Message 2 of 2
RSFAdsk
in reply to: hoangvuminh

Hello,

 

I think the code below should allow you  to get informatuion from the PnPDrawings table:

 

 

{

   Project prj = PnPProjectUtils.GetProjectPartForCurrentDocument();

   DataLinksManagerdlm = prj.DataLinksManager;

   PnPDatabasedb = dlm.GetPnPDatabase();

 

   PnPTable tblDwg = db.Tables["PnPDrawings"];

   

   //Plant SDK 2012 use Select

   PnPRow[] rows = tblDwg.Select();

   dumpRows(rows);

}

 

//Utility 

void dumpRows(PnPRow[] rows)

{

   foreach (PnPRow r inrows)

      dumpRow(r);

}

void dumpRow(PnPRowr)

{

   Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;

   ed.WriteMessage("\n ");

   //For every column in the fow list the value.

   foreach (PnPColumn c inr.Table.AllColumns)

   {

      objectval = r[c];

      ed.WriteMessage(

      string.Format("{0}={1} ", c.Name, val));

   }

}



Richard Frank
Autodesk Knowledge Network
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report

”Boost