API added parameters In different Revit versions

API added parameters In different Revit versions

Anonymous
Not applicable
360 Views
1 Reply
Message 1 of 2

API added parameters In different Revit versions

Anonymous
Not applicable

Hello,

 

I've been working in Revit since several years. Now we have a problem with some extra parameters.

I'll try to explain through an example.

In Revit we have a set of type parameters and occurence parameters. The problem occurs in the occurence parameters.

In Revit 2014 we have a list of occurence parameters for a Garage Door.

I've migrated the same Revit document to Revit 2016 and when we execute our software, there are some parameters added to the occurence parameters.

Especially the "Area" and "Volume" parameters are causing problems for us.

The strange thing is that if I check the Revit interface there is no parameter "Area" or "Volume" present.

 

In my first research I've found that only the family types have these problems. The weird thing is that also the values are wrong.

I have a garage door with an area of 33.92 m² which is incoherent with the other measurements.

 

Is there a way to exclude these parameters whilst recovering all the parameters through the API?

 

I've added some pictures as example. The list of the occurence parameters from the garage door in Revit 2014 and 2016.

 

Thanks in advance.

 

GIll Gonnissen

 

Parameters Revit 2014.PNGParameters Revit 2016.PNG

0 Likes
361 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk

Dear Gill,

 

Although you do not explicitly say so, I would guess that your problem stems from the replacement of the get_Parameter method used in C# to access the obsolete Parameter property taking a parameter display string name argument by the new and improved GetParameters method.

 

Retrieving parameters by display name is not recommeded. Using a GUID for shared parameters and a built-in parmeter enumeration value for built-in parameters is much safer and more efficient as well.

 

More than one parameters may match the name you are specifying. You need to ensure that you get the one that you really intend.

 

Here is some more info on the topic of Revit 2015 Parameter API changes:

 

http://thebuildingcoder.typepad.com/blog/2014/04/whats-new-in-the-revit-2015-api.html#2.04

 

http://thebuildingcoder.typepad.com/blog/2014/09/modifying-saving-and-reloading-families.html

 

http://thebuildingcoder.typepad.com/blog/2015/02/family-instance-area-and-auto-loading-a-project-fil...

 

http://thebuildingcoder.typepad.com/blog/2015/02/family-instance-area-and-auto-loading-a-project-fil...

 

http://thebuildingcoder.typepad.com/blog/2015/06/cnc-direct-export-wall-parts-to-dxf-and-sat.html#20...

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder