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: 

Bug in ElementTransformUtils.CopyElements Method

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
Revitalizer
513 Views, 8 Replies

Bug in ElementTransformUtils.CopyElements Method

Hi Autodesk,

 

there is another bug in the API.

 

When copying a Material element from one document to another one, its render appearance will not be transferred, too.

Found with Revit 2015 and 2017.

 

 

Regards,

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





8 REPLIES 8
Message 2 of 9

Hi @Revitalizer,

It would not surprise me. Duplicating a material doesn't copy across project shared parameter values when using the UI.

I tested whether this bug is the same when using the UI (in 2017 - copy/paste, taking care to select the material element, a model element, and paste into a legitimate view), and it is.

So, it's a general Revit issue, not an API issue.

 

Did you report it?

 

Cheers,

 

-Matt


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 3 of 9

Hi Matthew,

 

no bug because it is Revit's default behavior. I think that explains it.

Thank you for clarifying.

 

Nonetheless, the copy/paste behavior is not really satisfying because the render appearance is an important part of a material.

Since we still cannot set it via API, the copy/paste method seemed the only approach to add it to the document.

 

<Sigh.>

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 4 of 9

Hi @Revitalizer,

I put in a bug report about not duplicating the shared parameter values (REVIT-90676) last year. The report suggested that they were looking at fixing it for 2018.

Did you try duplicating any supporting elements (in a different transaction?) before copying the material? Probably just as easy using the UI for that, come to think of it...

Anyway, I'm sure you've gone through all the possibilities, but let me know if you want to throw some ideas about!

 

Cheers,

 

-Matt


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 5 of 9
jeremytammik
in reply to: Revitalizer

Dear Revitalizer and Matt,

 

Thank you for your report and pointing out the existing development issue REVIT-90676 [Value is blank for Duplicated Materials].

 

As far as I can tell, it is indeed scheduled to be resolved in the next major upcoming release.

 

I added a note to it of your discussion above and asked for confirmation.

 

I hope this helps.

 

Best regards,

 

Jeremy



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

Message 6 of 9
Revitalizer
in reply to: jeremytammik

Hi Jeremy,

 

the next upcoming release - will that be this year or next year ?

 

 

Greetings,

Rudi




Rudolf Honke
Software Developer
Mensch und Maschine





Message 7 of 9
jeremytammik
in reply to: Revitalizer

Dear Rudi,

 

this  🙂

 

Cheers,

 

Jeremy



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

Message 8 of 9
jeremytammik
in reply to: Revitalizer

Dear Rudi,

 

For safety's sake, I checked with the development team, and I am sorry to say that it may well take until next year after all..

 

They say: I'm not sure if it is just a small improvement. Materials dialog and content is an external component. We need to copy Revit data when material is duplicated by the component.

 

Cheers,

 

Jeremy



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

Message 9 of 9
Revitalizer
in reply to: jeremytammik

Hi Jeremy,

 

I thought as much 😞

 

I already know that all the materials stuff is an external component, but if it has an API for Autodesk's product developers,

it would be fine if it could be made accessible for the end users.

Any access would be an improvement compared to the state of now.

 

The copy/paste approach would have been only a workaround,

caused by the rudimentary access to the material properties, even after all the years.

 

But of course both ways should function in the future: direct write access to material properties and copying elements with all the depending aspects.

 

 

Cheers,

Rudi




Rudolf Honke
Software Developer
Mensch und Maschine





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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community