finding correct Family template for sweep and rotations

finding correct Family template for sweep and rotations

dirk.neethling
Advocate Advocate
894 Views
8 Replies
Message 1 of 9

finding correct Family template for sweep and rotations

dirk.neethling
Advocate
Advocate

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

 

0 Likes
Accepted solutions (2)
895 Views
8 Replies
Replies (8)
Message 2 of 9

FAIR59
Advisor
Advisor
Accepted solution

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

Message 3 of 9

dirk.neethling
Advocate
Advocate

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

 

 

0 Likes
Message 4 of 9

FAIR59
Advisor
Advisor

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

Message 5 of 9

dirk.neethling
Advocate
Advocate

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.

0 Likes
Message 6 of 9

dirk.neethling
Advocate
Advocate

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"

0 Likes
Message 7 of 9

FAIR59
Advisor
Advisor

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

0 Likes
Message 8 of 9

dirk.neethling
Advocate
Advocate

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

 

0 Likes
Message 9 of 9

dirk.neethling
Advocate
Advocate
Accepted solution

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...

 

0 Likes