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.