Get User Properties
Posted: Mon Sep 19, 2016 6:19 am
Hi folks,
I try do read userproperties defined in my part document. The properties are defined in a library. In the part I set the property. If I try to read this in my code the programm crashes. Here is my part of code.
PdmObjectId userPropertyObjectId = TopSolidHost.Pdm.SearchDocumentByUniversalId(PdmObjectId.Empty, "Domain", "UserProperties");
if (userPropertyObjectId.IsEmpty) return;
DocumentId userPropertyDocId = TopSolidHost.Documents.GetDocument(userPropertyObjectId);
ElementId param = TopSolidHost.Parameters.SearchUserPropertyParameter(docID, userPropertyDocId); // crash
I try do read userproperties defined in my part document. The properties are defined in a library. In the part I set the property. If I try to read this in my code the programm crashes. Here is my part of code.
PdmObjectId userPropertyObjectId = TopSolidHost.Pdm.SearchDocumentByUniversalId(PdmObjectId.Empty, "Domain", "UserProperties");
if (userPropertyObjectId.IsEmpty) return;
DocumentId userPropertyDocId = TopSolidHost.Documents.GetDocument(userPropertyObjectId);
ElementId param = TopSolidHost.Parameters.SearchUserPropertyParameter(docID, userPropertyDocId); // crash