Using MaxScript to access metadata from objects imported from Revit via Linked FBX

Michael_Seawell
Participant

Using MaxScript to access metadata from objects imported from Revit via Linked FBX

Michael_Seawell
Participant
Participant

Hello,

 

I'm using the Linked FBX workflow to import a large scene from Revit and I'm reading in the Max documentation that metadata should transfer with this pipeline, but I don't see anything listed in the "User Defined Properties" of the objects. If I use the Revit Property Explorer found under "Tools > All Global Explorers" I do see that metadata has carried over, including the Revit Category, Family, Level, and Type. (see attached screenshot).

 

It's great to have the option to view to this data in the UI, but is there a way to access this data via MaxScript as well?

 

Thank you for the help!

 

0 Likes
Reply
Accepted solutions (1)
1,542 Views
8 Replies
Replies (8)

Swordslayer
Advisor
Advisor

Michael_Seawell
Participant
Participant

@Swordslayer - Here's a test file using the Linked FBX process to import a few Revit objects in Max 2024. Afterwards, I used the bind function to make the Revit geometry local to the Max file for testing purposes.

 

Metadata is not visible in the Object Properties window but if you go to Tools > All Global Explorers > Revit Property Explorer, you'll find that metadata has carried over, including the Revit Family, Type, Category, and Level. Is there any way to read these metadata values/Revit properties using MaxScript?

0 Likes

denisT.MaxDoctor
Advisor
Advisor

How many people do you think are using 3ds max 2024 released less than two months ago? 

Is it something specific for this version?

 

0 Likes

Swordslayer
Advisor
Advisor
Accepted solution

It's stored in custom attributes:

 

for obj in objects do
	for attrib in obj.custattributes do
		for prop in getPropNames attrib do format "% % %\n" obj.name prop (getProperty obj prop)
0 Likes

Michael_Seawell
Participant
Participant

Only Swordslayer and I were given exclusive access to the latest version. 😉

 

In all seriousness though, I understand that I'm the one reaching out for help here, hat-in-hand, and I truly appreciate any guidance I can get, but a reply like that was unnecessary. I overlooked the fact that Max 2024 recently came out and a reminder to upload a previous version would suffice. Too often, reaching out to a new forum is intimidating for reasons like this.

0 Likes

Michael_Seawell
Participant
Participant
This is excellent - I appreciate your help on this! Our team previously relied on Linked Revit files, which store Metadata in the more obvious Object Properties panel, so this will get us started down the right track rebuilding our pipeline. Thank you!
0 Likes

denisT.MaxDoctor
Advisor
Advisor

If you had been more active on this forum, you would have likely noticed how many times I have emphasized to people that the chances of receiving an answer to their question primarily depend on how the question is posed... For instance, you received a response as soon as you posted the scene itself. To increase the chances, if possible, it is advisable to provide an example in the currently most widely used version, which is likely not the latest.

 

Every time I delve into someone else's problems, I find something useful for myself... otherwise, I wouldn't invest my time in it. In your case, I didn't gain any benefit, even though the problem itself was interesting to me.

0 Likes

Michael_Seawell
Participant
Participant
I agree, the problem itself is interesting, especially when automating a pipeline between two or more programs. I assist new users within visualization forums often, so when I approach other forums outside my realm, I try my best to avoid posting the dreaded equivalent to "how much does a car cost?" . Duly noted on always providing a Max file for reference and using the most compatible version. Thanks, Denis!
0 Likes