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: 

Transfer Project Standards

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
796 Views, 2 Replies

Transfer Project Standards

Anonymous
Not applicable

Hello:

 

I was wondering if the Transfer Project Standards has become a possibility yet using the API?  If not, what suggestions are available for automating the task?

 

Thank You In Advance

 

Lester

0 Likes

Transfer Project Standards

Hello:

 

I was wondering if the Transfer Project Standards has become a possibility yet using the API?  If not, what suggestions are available for automating the task?

 

Thank You In Advance

 

Lester

2 REPLIES 2
Message 2 of 3
Aaron.Lu
in reply to: Anonymous

Aaron.Lu
Autodesk
Autodesk
Accepted solution
I think you can make use of method: ElementTransformUtils.CopyElements


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes

I think you can make use of method: ElementTransformUtils.CopyElements


Aaron Lu
Developer Technical Services
Autodesk Developer Network
Message 3 of 3
arnostlobel
in reply to: Aaron.Lu

arnostlobel
Alumni
Alumni
Accepted solution

I've wanted to add something...

 

While it is indeed possible to copy project standards from one document to another using the Copy method, it needs to be pointed out that this does not necessarily yields the same result the UI command does. In fact, there may be some situations when the Copy does not work.

 

  • The UI would warn about existing types in the target project and would ask what to do about it. I am not sure what the Copy would do in such situations, but one way or another, it can be something that not everyone may like or expect.
  • The Copy uses the clipboard, thus whatever was on it before the operation it would be wiped out. The UI version leaves the clipboard alone.
  • There may be (and most likely are, I just do not know what exactly) some specific cases the UI would handle specificly and appropriately for whatever the case is (like copying a certain type of elements). The Copy version would not do such things, naturally, for it does not know what it is copying.

 

So, that's my little disclaimer. Again, the Copy operation may work for copying project standards, but I'd advise to pay attention to results. 

Arnošt Löbel

I've wanted to add something...

 

While it is indeed possible to copy project standards from one document to another using the Copy method, it needs to be pointed out that this does not necessarily yields the same result the UI command does. In fact, there may be some situations when the Copy does not work.

 

  • The UI would warn about existing types in the target project and would ask what to do about it. I am not sure what the Copy would do in such situations, but one way or another, it can be something that not everyone may like or expect.
  • The Copy uses the clipboard, thus whatever was on it before the operation it would be wiped out. The UI version leaves the clipboard alone.
  • There may be (and most likely are, I just do not know what exactly) some specific cases the UI would handle specificly and appropriately for whatever the case is (like copying a certain type of elements). The Copy version would not do such things, naturally, for it does not know what it is copying.

 

So, that's my little disclaimer. Again, the Copy operation may work for copying project standards, but I'd advise to pay attention to results. 

Arnošt Löbel

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

Post to forums  

Autodesk Design & Make Report