Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatically fill parameters when the file is updated

2 REPLIES 2
Reply
Message 1 of 3
mat_hijs
165 Views, 2 Replies

Automatically fill parameters when the file is updated

I have some Revit projects that are exports from Inventor. I also have a dynamo script that checks if certain shared parameters exist in the project, if they don't exist, it adds them, if they do exist it fills their values based on the type names of the family instances. All these models are grouped in a separate folder and are all linked within my main Revit project.

Right now I need to run this every time I updated the export from Inventor to make sure all the values are up to date. I'm looking for a way to do this automatically when the export is updated.

My first thought was somehow running the dynamo script automatically but I haven't found a way to do this. My second thought was somehow running a macro on a specific event but I wouldn't know what event could be used. Also, I'm not familiar with the Revit API so that would be a challenge.

 

Anyone has any idea's how to accomplish this?

2 REPLIES 2
Message 2 of 3
jeremy_tammik
in reply to: mat_hijs

You could use the DocumentOpened event to trigger running your script automatically each time a document is opened:

  

https://www.revitapidocs.com/2023/7e5bc7a1-0475-b2ec-0aec-c410015737fe.htm

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 3
mat_hijs
in reply to: jeremy_tammik

@jeremy_tammik Will this event trigger a macro in the linked model when the main model is opened or would the file have to be actually opened manually? If it will be triggered, will this cause problems because there might be 10 models that are triggered to run a macro at the same time?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report