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: 

finding correct Family template for sweep and rotations

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
dirk.neethling
556 Views, 8 Replies

finding correct Family template for sweep and rotations

I create a Family via a Routine. It's meant to be a System of gaskets in a segmental tunnel lining system.

This Family is instantiated for every segmental lining ring which is instantiated and both translated and rotated into place using the same transforms.  Depending on which template (which actually work)  I use, several things happen:

 

1. The FamilyInstances cannot be rotated, only translated

2. famDoc.FamilyCreate.NewSweep does not work, even though it works in some templates, which however are useless for Placement.

 

Templates which worked partially are:

1. Metric Generic Model Adaptive

2. Metric Generic Model

3. M_Allgemeines Modell

 

However none of these templates solve the 2 requiremenets:

1. Create a sweep of the gasket/seal

2. translate AND rotate a familyInstance

 

Does someone have an idea how this can be fixed?

adaptive_el.png

 

8 REPLIES 8
Message 2 of 9
FAIR59
in reply to: dirk.neethling

I think the Metric Mechanical Equipment / M_Mechanische Geräte template will do those things.

Message 3 of 9
dirk.neethling
in reply to: FAIR59

When I use "M_Mechanische Geräte" as template, I get this error even though the template file is in the Folder as requested:

M_Mechanische Geräte1.png

 

 

Message 4 of 9
FAIR59
in reply to: dirk.neethling

it looks like you are missing the file-extension .rft in the name

Message 5 of 9
dirk.neethling
in reply to: FAIR59

I wish the Building Coder would just have try...catch, then I can locate the problem. Now I have to search around where these popups are generated.

Message 6 of 9
dirk.neethling
in reply to: FAIR59

M_Mechanische Geräte template is drawing the seal. However when I call the following, it Returns null for profileSymbol:

profileSymbol = Util.FindFamilySymbol(doc, ProfileSymbolName, ProfileSymbolName) as FamilySymbol;

with ProfileSymbolName = "SegmentDichtung"

Message 7 of 9
FAIR59
in reply to: dirk.neethling

I'm not familiar with this method (Util.FindFamilySymbol), but I will take a guess that the 2nd argument needs to be the familyName.

Message 8 of 9
dirk.neethling
in reply to: FAIR59

Hello FAIR59,

 

thanks, M_Mechanische Geräte template met both requirements:

 

1. allow famDoc.FamilyCreate.NewSweep

2. Transform familyInstance in all axes, incl. Rotation

 

Regards, Dirk

 

Message 9 of 9

The solution is to use General Family type,

 

Metric Generic Model.rft

 

then use the method in the following thread to do transformations:

 

https://forums.autodesk.com/t5/revit-api-forum/can-t-rotate-element-into-this-position/m-p/7296403#M...

 

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