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: 

Create Similar,Keep instance parameters。

5 REPLIES 5
Reply
Message 1 of 6
dali0312
270 Views, 5 Replies

Create Similar,Keep instance parameters。

Create Similar in Revit can preserve instance parameters of family files,But I couldn't find a type API that can achieve this effect.

Copying cannot create a rotated family with an unrotated state.

5 REPLIES 5
Message 2 of 6
jeremy_tammik
in reply to: dali0312

Yes. Properties and parameter values in types and instances need to be copied from the original and repopulated onto the copy.

   

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

I don't want to achieve this effect through parameter assignment,Is there any other way to implement the Create Similarity API in Revit?
Message 4 of 6
jeremy_tammik
in reply to: dali0312

Basically, the Revit API is a wrapper around the UI functionality. The Create Similar command just does what it does in the UI.

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 5 of 6
sragan
in reply to: dali0312

Actually, that's exactly what I get when I try "Create Similar" with a couple of different families.

 

Copy and paste, and copy to clipboard and paste both include any rotation of the family, but Create Similar places the families without rotation.

 

Edit:  That is not using the API.  That's just using the user interface.   Does it work different through the API?

 

 

Message 6 of 6
TripleM-Dev.net
in reply to: dali0312

Hi,

 

Well actually, depending on the family type the rotation can be retrieved and inverted.

For instance if the family's location is a LocationPoint, it actually has a property "Rotation"

So Copy family and then apply a inverted rotate?

 

I'm guessing the Create Similar places a new family and then applies the values of the selected onto the new one, except for some builtin parameters like Mark,IfcGuid.

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

Post to forums  

Autodesk Design & Make Report