Change the level of an element

Change the level of an element

FRFR1426
Collaborator Collaborator
4,237 Views
1 Reply
Message 1 of 2

Change the level of an element

FRFR1426
Collaborator
Collaborator

How can I change the level of an element? Level property is read-only...

 

There is a trick or a hidden method somewhere?

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr
0 Likes
Accepted solutions (1)
4,238 Views
1 Reply
Reply (1)
Message 2 of 2

Revitalizer
Advisor
Advisor
Accepted solution

Hi,

 

instead of setting the level *property*, you could try to set the level *parameter*.

 

Depending on the type and category of the element you want to modify, you could set the BuiltInParameter.FAMILY_LEVEL_PARAM (for FamilyInstances), for example.

 

Use RevitLookup to get the level parameters for other kinds of elements.

Level params usually are set with an ElementId:

 

http://thebuildingcoder.typepad.com/blog/2011/01/family-instance-missing-level-property.html

 

 

Best regards,

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine