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

Changes to Data Manager not propagating to Autodesk Construction Cloud

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Sonny_Dethier
208 Views, 4 Replies

Changes to Data Manager not propagating to Autodesk Construction Cloud

Hello,

I wrote some code in C# to get some data from the PID database and to update the P3D database then the Tag fields match.

 

I tested it and it works locally, but the changes don't propagate to the Construction Cloud.

 

The code:


var projPid = currentProj.ProjectParts["PnID"];
var dlmPid = projPid.DataLinksManager;
var dbPid = dlmPid.GetPnPDatabase();
var drawingsTable = dbPid.Tables["PipeLineGroup"];
var allPidPipes = drawingsTable.Select("Description='PIPE LINE GROUP'");


var projP3d = currentProj.ProjectParts["Piping"];
var dlmP3d = projP3d.DataLinksManager;
var dbP3d = dlmP3d.GetPnPDatabase();
drawingsTable = dbP3d.Tables["P3dLineGroup"];
var allP3dPipes = drawingsTable.Select("Tag like '%'");

foreach ( var p in allPidPipes )
{
PnPRow partRowPID = dbPid.GetRow(Convert.ToInt32(p["PnPID"]));
var linePID = $"{p["Service"]}{p["Secteur"]}{p["Page"]}{p["LineNumber"]}";

var partRowP3D = allP3dPipes.FirstOrDefault(e => e["Tag"].ToString() == linePID);
if ( partRowP3D != null )
{
ed.WriteMessage($"linePID={linePID}, partRowP3D={partRowP3D["Tag"]}");
partRowP3D.SetPropertyValue("test", "TESTAAA");

}

}

 

4 REPLIES 4
Message 2 of 5
jabowabo
in reply to: Sonny_Dethier

Have you tried checking out all affected drawings prior to running your code?

Message 3 of 5
Sonny_Dethier
in reply to: jabowabo

You mean I have to go drawing by drawing if I want to change properties?

I can't just make changes in the P3dLineGroup table and somehow save the changes?

Typically, what I want to do is take the line designation table information taken from the PIDs and sync it with the lines in the P3DLineGroup table where tags match so I can map the P3DLineGroup fields in my isometrics.

Message 4 of 5
jabowabo
in reply to: Sonny_Dethier


@Sonny_Dethier wrote:

You mean I have to go drawing by drawing if I want to change properties?

I can't just make changes in the P3dLineGroup table and somehow save the changes?


I'm not certain. I'd guess you'll either need to checkout the project settings or the drawings while running your code then check back in for the ACC data to update.

Message 5 of 5
Sonny_Dethier
in reply to: jabowabo

In order for Autodesk Construction Cloud to know a change was made in the drawing, you have to update the PnPBase table. Find the PnPID and update the PnPTimestamp to the current time in Ticks.

 

Once you check in the drawing, the changes will be propagated to ACC.

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report