Copy Monitor - API access to monitored object

Copy Monitor - API access to monitored object

Anonymous
3,067 Views
6 Replies
Message 1 of 7

Copy Monitor - API access to monitored object

Anonymous
Not applicable

When an object is copy monitored (from arch to MEP model) is the monitored object's element information(elementID, etc.) accessible from within the MEP model? 

3,068 Views
6 Replies
Replies (6)
Message 2 of 7

aignatovich
Advisor
Advisor
Unfortunately no 😞 we also need it, there is an idea in revit ideas forum board, vote for it, please
0 Likes
Message 3 of 7

Anonymous
Not applicable

Voted. Thanks. 

0 Likes
Message 4 of 7

jeremytammik
Autodesk
Autodesk

A workaround is hinted at in the Revit API Roundtable notes from AU 2013:

 

http://thebuildingcoder.typepad.com/blog/2013/12/au-day-2-worksharing-and-revit-2014-api-roundtables...

 

[q] convert an element from linked file and put them into the host document. can i do that? 


[a] copy monitor approach lets them remain in the link, and the copy paste API can bring them in properly. use copy paste and then delete the linked element. that will require unloading it. depending on what element you ant to bring over, it may run into problems trying to separate it from its relationships. it might bring it in with the right shape. otherwise you might need to read boundaries and recreate it. if you bring it in as is it will be looking for sketch curves in the wrong place.

 

Also mentioned in the Revit API Expert Panel 2014:

 

http://thebuildingcoder.typepad.com/blog/2014/12/the-revit-api-panel-at-autodesk-university.html

 

Q: Does the current API support copy/monitor? I have an architectural model and want to copy/monitor. I can programmatically go in and copy objects, but have not found a way for copy/monitor. I want to copy elements out of a model into another one and monitor them. This is available as a Revit command. We want to drive copy/monitor fully programmatically without the user having to manually select the elements.

 

A: You can copy the elements and add a DMU updater to monitor them. This is a lot of work. Or use the built-in Revit command as is? Hard to drive the Revit built-in command fully automatically, PostCommand switches to the standard user interface and prompts for input, e.g. selection. Maybe you can preselect the elements and then call PostCommand? Nope, apparently not. If not, this might be added as a wish list item. Please submit a reproducible case and a wish list item.

 

Q: We also need copy/monitor. Linked monitor to control visibility of linked model. I have lots of towers, e.g. 20-30. I need to set the visibility of linked structural models. Maybe we have 20 small Revit models. We also need API to select elements in the linked models.

 

A: I want that too in linked IFC files. There is no API for that. Better view visibility control for linked objects is needed. We are expanding the linked API. Linked documents are listed in the application Documents collection. Workaround: You need to unload the link before making modifications to the linked document. We ended up setting up an interface to select elements in a linked model by grabbing the GUID and, behind the scenes, in a new session, bring those GUIDs back in and hide each one individually, then reload. This requires two Revit sessions. I had the same issue of controlling visibility in linked model and the critical issue in my case was we had to wrap individual models and linked views; it was a kind of painful nightmare. The API does in fact provide a method to get the monitored element of another element: Element.GetMonitoredLinkElementIds. However, is there a way to set this? (Thank you, Eric!)

 

I hope this helps.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 7

Anonymous
Not applicable

Jeremy:

 

Thanks for the response! We here at AMA are huge fans of your and really appreciate your community support and enthusiasm. 

 

In regards to this post, what we have accomplished is a way to place our own version of each MEP electrical and lighting fixture for each version in a linked arch background. It's just like type mapping but it allows us to then run our own developed coordination review. 

 

We also have existing projects which use the OOTB copy monitor and we need to enter the elementID of the object it is monitoring. Unfortunately when we snoop a copied object, there is no reference to it's monitored object, just the monitored revit link. 

 

I hope this is clear, if not I can try to explain better. 

0 Likes
Message 6 of 7

david_rock
Enthusiast
Enthusiast

Hello,

The only workaround I can find is to compare the X,Y,Z coordinates of all the elements in the link file and the monitor elements in the host model. Seriously is this true?

 

I see BIMLink has a workflow that uses X,Y,Z coordinates in there solution.

 

Are there any other simpler apps for this? or do I need to write my own solution using this X,Y,Z coordinate?

To get started can anyone suggest a filter to find all elements in the host model which are monitored?

 

Regards

David

 

0 Likes
Message 7 of 7

Dronov.Dmitry
Advocate
Advocate
0 Likes