Adjust System Family parameter before placement

Adjust System Family parameter before placement

carlos_carmona
Participant Participant
559 Views
3 Replies
Message 1 of 4

Adjust System Family parameter before placement

carlos_carmona
Participant
Participant

Hi All,

 

Im working in Revit 2014 and I'd like to know if there's an API to access the parameter called "Service Type" before a cable tray is placed.

0 Likes
Accepted solutions (1)
560 Views
3 Replies
Replies (3)
Message 2 of 4

augusto.goncalves
Alumni
Alumni
Before the element is placed there is not element, just the family symbol. If you change the parameter on the family, it will not affect the instance.

Or you can wait until the instance is created, then change right after (almost transparent to the user).

Would that work?
Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
0 Likes
Message 3 of 4

carlos_carmona
Participant
Participant

Thank you for your answer, but what I’m trying to find out, if exist, is access through API into the default instance values of the cable tray as Revit behave through the interface. When you create a cable tray the last value will be display the next time you click on cable tray, so I assume that Revit internally has those values store.

 

So I created a temporary cable tray with the instance values that I want, hoping that Revit will retain this values as it does on the interface, but it doesn't using the API.

 

CableTray tempcable = CableTray.Create(ActiveDocument, ActiveDocument.ForEach<CableTrayType>(x => x.Name == "Branch Conduit Zone").Id,
new XYZ(0, 0, 0), new XYZ(10, 0, 0), Active.ActiveView.LevelId);

 

Best Regards,

 

 

0 Likes
Message 4 of 4

augusto.goncalves
Alumni
Alumni
Accepted solution
Don't believe that is available...

The closest method I could find is
Document.SetDefaultElementTypeId(ElementTypeGroup.CableTrayType, typeId)
Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
0 Likes