cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Navisworks crashes when trying to get file metadata

0 Kudos
511

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

Accepted Solutions (0)

Answers (0)

Ask a Question
Top Q&A Solution Author