Convert ParameterType.ConnectorSystemType to SpecTypeId

Convert ParameterType.ConnectorSystemType to SpecTypeId

chuebner03
Contributor Contributor
293 Views
1 Reply
Message 1 of 2

Convert ParameterType.ConnectorSystemType to SpecTypeId

chuebner03
Contributor
Contributor

I am trying to port some legacy code to Revit 2022 and I am running into the problem with a few parameter type migrations when following the documentation.  ConnectorSystemType should migrate to ElectricalSystemType, ConnectorSystemClassification should migrate to PipeSystemType but both are throwing errors.

 

ParameterType.ConnectorSystemType looks to me like it would be migrated to SpecTypeId.ElectricalSystemType but I am getting this error:

chuebner03_2-1646895971498.png

 

 

Having similar issues with:

Migrating ParameterType.Exist to SpecTypeId.Exist

Migrating ParameterType.ConnectorSystemClassification to SpecTypeId.PipeSystemType

 

Any help would be greatly appreciated!

0 Likes
Accepted solutions (1)
294 Views
1 Reply
Reply (1)
Message 2 of 2

stewart_skyler
Enthusiast
Enthusiast
Accepted solution

You need to specify which ElectricalSystemType you're comparing param.Type to.
https://www.revitapidocs.com/2022/90f62108-9cd1-a66a-a123-8372307f4e7f.htm

 

Or, if you're trying to check if the connector is an electrical connector, you should take a look at the domain property.
https://www.revitapidocs.com/2022/cc4ddae1-5c0c-6bd3-6847-da8e7ae7e8e3.htm

0 Likes