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

How to Get M-Files Built-in Properties, Classes, Object Types?

I'd like to get the properties, classes, object types that are present when a fresh new vault is added. What I see now is some enum like - MFBuiltInPropertyDef, MFBuiltInObjectType, MFBuiltInObjectClass. But in the newly crated vault, apart from those enum ids we see some other stuffs. 

How to get those built-in stuffs of newly created vault?

Parents
  • Can you give me an example of the sort of thing you mean? 

  • Sure. Here is an example for properties - 

    When the highlighted Hide Built-in property definition is clicked, only these properties are shown out of which Test is created by myself -




    I guess all the properties in first image except properties in second images, are built-in properties. Now I'd like to fetch all the properties that were shown in first image except the properties in second image. 

    I want the same behavior for classes, object types as well.

  • Which of these do not exist in the built-in enum though?

  • Like, for properties, these are not present in enum - 

    I see this are not shown if Hide Built-in property is being clicked. 

    One question popped up in my mind - Keywords and Name or title is showing even if Hide Built-in property is being clicked. 

  • Aha.

    So some of those properties are created automatically when you create object types and the like.  So they are "built in" in that they are not something you are expected to change, but they are not built-in in that they're available in all vaults all of the time.

    An example may be something like "Owner (Assignment)".  The ID for the object type Assignment is built-in and in the enum, but that property is generated when the vault is created and could theoretically be different in different vaults.  As a result if you wanted to get the ID of this you would load the Assignment object type and then read the "OwnerPropertyDef" property to find the runtime ID for this property.

Reply
  • Aha.

    So some of those properties are created automatically when you create object types and the like.  So they are "built in" in that they are not something you are expected to change, but they are not built-in in that they're available in all vaults all of the time.

    An example may be something like "Owner (Assignment)".  The ID for the object type Assignment is built-in and in the enum, but that property is generated when the vault is created and could theoretically be different in different vaults.  As a result if you wanted to get the ID of this you would load the Assignment object type and then read the "OwnerPropertyDef" property to find the runtime ID for this property.

Children