Changes to Data Manager not propagating to Autodesk Construction Cloud

Changes to Data Manager not propagating to Autodesk Construction Cloud

Sonny_Dethier
Enthusiast Enthusiast
561 Views
4 Replies
Message 1 of 5

Changes to Data Manager not propagating to Autodesk Construction Cloud

Sonny_Dethier
Enthusiast
Enthusiast

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");

}

}

 

0 Likes
Accepted solutions (1)
562 Views
4 Replies
Replies (4)
Message 2 of 5

jabowabo
Mentor
Mentor

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

0 Likes
Message 3 of 5

Sonny_Dethier
Enthusiast
Enthusiast

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.

0 Likes
Message 4 of 5

jabowabo
Mentor
Mentor

@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.

0 Likes
Message 5 of 5

Sonny_Dethier
Enthusiast
Enthusiast
Accepted solution

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.