Revit API

Reply
Distinguished Contributor
109 Posts
7 Kudos
Registered: ‎04-05-2012
Post 1 of 2
Accepted Solution

Change the level of an element

404 Views, 1 Replies
11-21-2012 07:25 AM

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

 

There is a trick or a hidden method somewhere?

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

Distinguished Contributor
119 Posts
30 Kudos
Registered: ‎09-07-2012
Post 2 of 2

Re: Change the level of an element

11-21-2012 07:57 AM in reply to: FRFR1426

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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post