Hello everyone ,
I am having some headache with the DataLinkManager. So that is what i wanna do :
- I need to locate the Database and then issue a DataLinkManager but when i call the method getManager(Database) in Visual Basic Express , it still said that the "parameter can not be converted to String" , hmm throug i choose the correct method
- Assumed that i do have some Rowids for example 450 , 478 (PnPID) . What i need now is the reference of these rows to the drawings. How can i do that plz help me
Thanx.
Solved! Go to Solution.
Solved by lopezjo. Go to Solution.
Can you post the code snippet? Hard to help with your specific error without seeing the code but here is a sample of how to get the DataLinksManager from the project in C# (will need to translate it to VB.NET):
using Autodesk.ProcessPower.PlantInstance;
using Autodesk.ProcessPower.ProjectManager;
using Autodesk.ProcessPower.DataLinks;
using Autodesk.ProcessPower.DataObjects;
PlantProject proj = PlantApplication.CurrentProject;
PipingProject prjpart = (PipingProject) proj.ProjectParts["Piping"]; // project is composed of multiple "parts"
DataLinksManager dlm = prjpart.DataLinksManager;
Now the dlm variable is a reference to an instance of the data links manager object responsible for ALL drawings of the PipingProject part (i.e. Plant 3D drawings).
There are several IDs the DLM can work with:
ObjectId - Normal AutoCAD entity ID.
long - Row ID that corresponds to PnPID seen in data manager.
PpObjectid - A combination of AutoCAD Handle identifier and drawing id (PnPID of internal row for drawing)
Through the DLM you can perform most activities. If you need to drop to a lower level of abstraction, then from DLM:
PnPDatabase db = dlm.GetPnPDatabase();
Now you have access to our database object and can access pretty much anything; be careful of "write" operations at this low level of abstraction as you can easily make mistakes wiring things up breaking data references / relationships. This level of the API only works with "long" row ids.
Hope this helps.
........
ObjectId - Normal AutoCAD entity ID.
long - Row ID that corresponds to PnPID seen in data manager.
PpObjectid - A combination of AutoCAD Handle identifier and drawing id (PnPID of internal row for drawing)
........
Thanx that was what i am looking for
@kgallagherCGHDN wrote:
where is this comming from Autodesk.ProcessPower.DataObjects?
Autodesk.ProcessPower.DataLinks.DataLinksManager
Autodesk.ProcessPower.DataObjects.PnPDatabase