Announcements

Announcement: We’re aware of an issue affecting starting a new topic from category pages and creating new blog posts. New topics can still be started directly from the relevant board. Learn more here.

user-defined property InwOaProperty, can it be set as boolean, Point3D etc aka VariantDataType

user-defined property InwOaProperty, can it be set as boolean, Point3D etc aka VariantDataType

alexisDVJML
Collaborator Collaborator
637 Views
2 Replies
Message 1 of 3

user-defined property InwOaProperty, can it be set as boolean, Point3D etc aka VariantDataType

alexisDVJML
Collaborator
Collaborator

For non user-defined category/properties, when accessing them, we get a VariantData that include its type VariantDataType. This includes boolean, Int32, Double, etc..

This provides better storage use, better search etc. than just having strings for all values.

When creating user-defined properties, we use InwOaProperty that has only object value field.

Seems to be working if we pass int, double, string.

Not sure about DoubleLength for example and things like Point3D, which type to pass/how to force this type when adding a property?

Anyone with experience with those?

Main Scientist, Full Stack Developer & When Time Permits Director of IDIGO ► On your marks, Set, Go
0 Likes
638 Views
2 Replies
Replies (2)
Message 2 of 3

ulski1
Collaborator
Collaborator

I have code that adds strings, datetime and decimal. I thought we where limited to the VariantDatatype?

Message 3 of 3

alexisDVJML
Collaborator
Collaborator

In addition to string I'm adding for now double and int.
I tested adding these double/int either as is or converting them to string.

1/ I noticed a difference in behaviour:
when inserted as int/double, if you try to edit them using Navisworks GUI dialog Edit Property Value (or double click), the dialog prevent entering non integer/double value, so Navisworks is aware of the inserted type, good!

However
2/ If I inspect these properties using AppInfo provided plugin, these properties are tagged as DisplayString while for non-user defined properties I have in various model, they are tagged correctly aka Int32, Double, etc.

Exemple of correctly tagged property, material:

alexisDVJML_1-1718390078065.pngalexisDVJML_1-1718390078065.png

 

Exemple of incorrectly tagged property, our user-defined MTO#:

alexisDVJML_0-1718390028526.pngalexisDVJML_0-1718390028526.png


So still very mysterious!!!


@naveen.kumar.t any insider informations/explanations?

Main Scientist, Full Stack Developer & When Time Permits Director of IDIGO ► On your marks, Set, Go
0 Likes