Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Plant 3D updating ConnectionManger config doesn't get saved.

1 REPLY 1
Reply
Message 1 of 2
zv_odd_101
179 Views, 1 Reply

Plant 3D updating ConnectionManger config doesn't get saved.

I have the below function to update the joint Slope tolerances. 
Updating the values in the ConnectionManager.config (from PnP3dConnectionManager.dll)  instance appears to change the values. 

 

 

public static void ChangeAllJointSlopeTolerances(double tolerance)
{
    var ed = Application.DocumentManager.MdiActiveDocument.Editor;
    var project = Autodesk.ProcessPower.PlantInstance.PlantApplication.CurrentProject;
    if (PnPProjectUtils.GetActiveDocumentType() != "Piping") return;

    var pipingProject = project.ProjectParts["Piping"] as PipingProject;
    var connectionManager = pipingProject.ConnectionManager as ConnectionManager;
    var jointsConfiguration = connectionManager.Config.JointsConfiguration;

    foreach (var joint in jointsConfiguration.Joints)
    {
        joint.SlopeTolerance = tolerance;
    }

}

 

 


But then saving the project doesn't update the config file that stores these values : in Plant Project folder DefaultConnectorsConfig.xml

I'm probably missing some fundamental information about how saving and updating internal databases works. Any pointers to documentation would be appreciated.

Labels (1)
1 REPLY 1
Message 2 of 2
jabowabo
in reply to: zv_odd_101

I don't think slope tolerance is saved anywhere but the .xml file. Why not just change it there?

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report