Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Export Properties

h.f.h
Contributor

Export Properties

h.f.h
Contributor
Contributor

Hello guys,

 

I am trying to export a series of properties from Navis to excel. Unfortunately all elements have a property set with its own name in it (IMAGE 1 ) , making it super time consuming to use the filter element selector. My idea is to develop some code that gets the properties inside the property set that CONTAINS some text that are common to all elements. Do you have any advise in it? Maybe some tool that already exist or some code to start. 

 

Thank you for all the help.

0 Likes
Reply
377 Views
2 Replies
Replies (2)

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi,

 

Could you please explain your issue in a bit more detail?


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes

alexisDVJML
Collaborator
Collaborator

Case 1: you already get a list of ModelItem for which you want to export these

=> easy: for each item, iterate through its PropertyCategories collection, use a Regex to find the category that match your pattern

 

Case 2: you want to search for items that have a category with this pattern.

=> hum, while SearchCondition has stuff like  SearchCondition.DisplayStringWildcard or SearchCondition.DisplayStringContains these seem to apply only to the Property display name and not the category

However in your case the items you are interested in should have a common category (e.g.: "AvevaEntityParameters" category).
So you can use a SearchCondition.HasCategoryByDisplayName then apply Case 1 for each item found.

Hope I understood your requirement correctly and these above helps.

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