Page 1 of 1

Change materials and add proxies in linked RVT files

Posted: Thu Oct 01, 2015 9:30 am
by archimage
Hello,

I'd like to know if there's a way to replace materials which are in a linked file ?

For example, the architectural project is in a master file, and the site in a linked file.

The trees, benches, and materials stuff need to be replaced with octane materials and proxies but I don't know how to do this for the site which is attached to the master file. It's working in each file, but not when they are linked :roll:

Is it working ?

Thank you.

Best regards

Re: Change materials and add proxies in linked RVT files

Posted: Thu Oct 01, 2015 10:02 am
by prehabitat
Good question! I've never tried this.

Paul would be able to comment on more detail on the specifics but it's prob worth making an isolated test:

Put some of your bench proxies in an empty 'site' file then draw a few walls (or something simple) in a 'building'/main file; link it up and see if it still doesn't work..

Re: Change materials and add proxies in linked RVT files

Posted: Thu Oct 01, 2015 10:08 am
by archimage
I did the test, but I couldn't get this working... only materials with the material picker, but not the proxies...

Re: Change materials and add proxies in linked RVT files

Posted: Thu Oct 01, 2015 11:18 am
by prehabitat
archimage wrote:I did the test, but I couldn't get this working... only materials with the material picker, but not the proxies...
Seems like a limitation in the mechanics of 'it all'.

Either restrictions in the API or its just not hooked up yet. Hopefully can be fixed; linked models are common in very large and very detailed projects.

Re: Change materials and add proxies in linked RVT files

Posted: Fri Oct 02, 2015 11:39 am
by face_off
It's not 100% clear from the plugin code how this will be handled by the Revit API. But my best guess is that if you have setup a proxy in a linked file, that proxy will NOT be read in the master file (ie. when a Revit scene is being loaded into Octane, only the proxies defined in the master file will have proxy geometry loaded into Octane). However if you assign a proxy in a master file for an element that is from a linked file, that /should/ work.

Paul

Re: Change materials and add proxies in linked RVT files

Posted: Tue Oct 06, 2015 4:19 pm
by archimage
Hello Paul,

I've tried this in the main scene but it doesn't make proxies from the objects from linked files.

Re: Change materials and add proxies in linked RVT files

Posted: Tue Oct 06, 2015 9:23 pm
by face_off
I've tried this in the main scene but it doesn't make proxies from the objects from linked files.
Yes, you are right - Revit is treating the entire linked file as a single entity within the activate document that contains the Octane proxy info - so it doesn't look like this is possible. You will need to assign proxies to elements belonging to the current scene.

Paul

Re: Change materials and add proxies in linked RVT files

Posted: Wed Oct 07, 2015 6:49 am
by Seekerfinder
archimage wrote:Hello,

I'd like to know if there's a way to replace materials which are in a linked file ?

For example, the architectural project is in a master file, and the site in a linked file.

The trees, benches, and materials stuff need to be replaced with octane materials and proxies but I don't know how to do this for the site which is attached to the master file. It's working in each file, but not when they are linked :roll:

Is it working ?

Thank you.

Best regards
Hi Archimage,
It sounds like the proxies actually do show up but just without their materials, right? I don't have time to experiment with this right now but what happens when you overwrite the linked model materials in your main model? Have you tried that?

We need to solve this one!

Seeker

Re: Change materials and add proxies in linked RVT files

Posted: Wed Oct 07, 2015 8:51 am
by archimage
Paul,

Thanks for your reply.

Actually in Revit I can select objects from the linked file individually in the Revit viewport by pressing the TAB key, they seem to be identified as separate objects. But their properties in Octane don't show up when they're highlighted, but I can still select linked file objects and change materials through the Octane viewport with the material picker.

I think there's something strange with this behaviour, Revit identifies subobjects from the linked file, the plugin only with the material picker, but since the proxies don't show up they can't be selected through the Octane viewport.

When we are used to work with complicated projects (big files, project file separated for schedules, team working). Copying objects from the linked to main file is not very comfortable, because the objects appear in the same time in the main and linked file. It almost needs to make one unique file for rendering. So my conlcusion is that the files organisation needs to readapt each time for the rendering needs, it makes the workflow painful. What we like in the plugin version is the opportunity to do fast renderings for each modification of the project quickly and stay focused in the modifications of the project since the scene is set once for all.

Do you think it's possible in the future to solve this linking behaviour ?

Thank you.

Seeker,

The problem is that objects from the linked file with proxies don't show up in the Octane Viewport, so I can't select them to override them.

Re: Change materials and add proxies in linked RVT files

Posted: Mon Oct 12, 2015 11:01 am
by face_off
Do you think it's possible in the future to solve this linking behaviour ?
I have done some research and testing on this, and in summary, the Revit API does NOT allow a plugin to access a selected element in a linked file. The API will allow the selection of a linked file element, but it will not return the actual element the user selected in the linked file. This is explained in http://thebuildingcoder.typepad.com/blo ... 69d0dd970b - with the relevant text being
RevitArkitek • 6 months ago

Any news regarding getting user selected linked elements? I wish to employ a tool where user may select a light fixture in host model or linked model first and then click tool to get info. But when selecting linked elements they are not recognized as being part of the selections set. I'm still in 2014. Thanks.

------------------------------------

Dear Adam,

That is a very valid question.

ActiveUIDocument.Selection.Elements cannnot return elements in any other document, simply because it would be returning duplicate elelement ids from multiple different documents, which would lead to great confusion.

In theory, there could be a way: UIDocument(linked_document).Selection.Elements could work, eventually; I do not think it does right now, though.

I don't even think we instantiating a UIDocument off a linked document is currently allowed...

Cheers, Jeremy.
So in summary, unfortunately assigning proxies to elements in a linked file is not possible.

Paul