Community
Vault Forum
Welcome to Autodesk’s Vault Forums. Share your knowledge, ask questions, and explore popular Vault topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API - How to execute GetPropertyComplianceFailuresByMasterIds

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
cadfish1
449 Views, 5 Replies

API - How to execute GetPropertyComplianceFailuresByMasterIds

I don't understand the arguments to GetPropertyComplianceFailuresByMasterIds, therefore I figure out how to use it.  I'm trying to get property compliance for items and documents.  So, it the entityClassId a item's or Document's ClassId & MasterId?  Or is the entity a property?

 

PropCompFail [] GetPropertyComplianceFailuresByMasterIds (
    String entityClassId,
    Long [] entityMasterIds,
    Boolean filterPending
);

5 REPLIES 5
Message 2 of 6
Redmond.D
in reply to: cadfish1

This article should answer your questions:  http://justonesandzeros.typepad.com/blog/2010/05/entities.html

 



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 3 of 6
cadfish1
in reply to: Redmond.D

Thanks Doug.

 

I had a had time finding the values for the entityClassId in API help.  The only place I can find it in is "What's New".  There should be a link to this page on every page entityClassId is referenced.

Message 4 of 6
cadfish1
in reply to: Redmond.D

 Doug,

 

I several UPDs that require a value.  The image below shows 3 of these properties that don't comply for one of the files I'm working with. When I execute GetPropertyComplianceFailuresByMasterIds (code is below) on one of the files that don't comply, it returns Nothing.  What am I doing wrong?

 

 

1700i946FED298472EAE6

 

 

Dim aMasterFileIds() As Long = {oFile.MasterId}
Dim aPropCompFail() As PropCompFail = moPropSrv. _
    GetPropertyComplianceFailuresByMasterIds("FILE", aMasterFileIds, False)
If Not aPropCompFail Is Nothing Then
    For Each oPropCompFail As PropCompFail In aPropCompFail
        Dim aPropertyDefIds() As Long = {oPropCompFail.PropDefId}
        Dim oPropDefInfo() As PropDefInfo = moPropSrv. _
    	    GetPropertyDefinitionInfosByEntityClassId("FILE", aPropertyDefIds)
        Dim sPropDisplayName As String = oPropDefInfo(0).PropDef.DispName
        Dim oPropConstrFail As PropConstrFail = oPropCompFail. _
    	    PropConstrFailArray(0)
        sPropertiesCompliance = sPropDisplayName & ": " & oPropConstrFail. _
    	    PropConstrFailTyp.ToString & ": " & oPropConstrFail.Val
    Next
End If

 

Message 5 of 6
Redmond.D
in reply to: cadfish1

It looks like the function is named wrong.  It only works if you to pass in the regular file Id, not the MasterId.

 

I'll log a defect on this.



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 6 of 6
cadfish1
in reply to: cadfish1

Thanks Doug, it worked.  I thought it odd that it was asking for a master id because each version or a file or Item has its own values of each property.

 

I pretty sure I'm stating the obvious but please notify the development team so thay can rename it and its entityMasterIds argument.  Even though the problem is solved for this application I'm developing, 6 months from now I'll probably forget about this issue.

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

Post to forums  

Autodesk Design & Make Report