on 2020 Oct 23 8:12 PM
Hello,
I am trying to get metadata for XREFs attached in Naviswork. When I try to do that, the Navisworks crashes as soon as program reaches the SAP portion of the code. The attached image shows the error from dmpuserinfo.xml as I was able to upload the file, it kept giving me errors. I get this error only when the files are from ECTR, if files are stored in local machine, I don't get this error.
internal bool GetPI(string strFile, ref PartInfo partInfo)
{
string applType = "UGS"; // Application type is mandatory
PlmConnectorConfig plmConnectorConfig = new PlmConnectorConfig(applType);
plmConnectorConfig.ApiLevel = 2;
IPlmRequestPart part = new PlmRequestPartImpl(strFilePath);
IPlmConnector connector = PlmConnectorFactory.GetPlmConnector(plmConnectorConfig);
PlmRequestPartList parts = new PlmRequestPartList();
parts.Add(part);
IPlmResponse response = connector.ProvideInfo(parts, true);
PlmResponsePartList plmResponseParts = response.Parts;
foreach (IPlmResponsePart responsePart in plmResponseParts)
{
PartInfo info = responsePart.PartInfo;
if (responsePart.Action == PartAction.DO_NOTHING && info != null)
{
string strFileName = responsePart.Filename;
if (strFileName == strFile)
{
partInfo = info;
return true;
}
}
}
return false
}
Please note that this code works perfectly for when used with AutoCAD.
Thank you,
MD
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.