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: 

Path Reinforcement gives an exception

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
208 Views, 0 Replies

Path Reinforcement gives an exception

When attempting to create path reinforcement in a new model my code gives an exception stating that the ElementID for Path Reinforcement must be valid.

 

I get the default elementID with the following code:

            ElementId defaultRebarBarTypeId = CDoc.myDoc.rvtDoc.GetDefaultElementTypeId(ElementTypeGroup.RebarBarType);
            ElementId defaultPathReinforcementTypeId = CDoc.myDoc.rvtDoc.GetDefaultElementTypeId(ElementTypeGroup.PathReinforcementType);


the first defaultRebarBarTypeId returns a valid elementID but the defaultPathReinforcementTypeId value is -1. The value changes to a valid number only after i create path reinforcement in my model and try to run my code again. Is there any way around having to do that everytime?

Tags (1)
0 REPLIES 0

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

Post to forums  

Forma Design Contest


Rail Community