This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Loop through a class lookups to find the class ID

Hi everyone,

I am trying to find a code which allow me to loop through a class value list and find class with ID 69. 

Below is my code. What i have achieved so far is to loop through the object relationship and find the object assignment. Next, i wanted to loop through the assignment and find the class of 69. 

Dim related : Set related = Vault.ObjectOperations.GetRelationships(objVer,MFRelationshipsModeAll)
Dim obj : Set obj = CreateObject("MFilesAPI.ObjVer")
Dim oLookups: Set oLookups = CreateObject("MFilesAPI.Lookups")
Dim ClassIndex : ClassIndex = 100

Dim oPropertyValues: Set oPropertyValues = Vault.ObjectPropertyOperations.GetProperties(ObjVer)
Dim vClass : vClass = oPropertyValues.SearchForProperty(ClassIndex).Value.GetLookupID()


For Each obj in related.GetAsObjVers

If obj.type = 10 Then

err.raise mfscriptcancel, "jumpa"

End if
Next

Parents Reply Children
No Data