DynamoDS / DynamoRevit

Dynamo Libraries for Revit
https://dynamobim.org
338 stars 188 forks source link

Family Instance.Type problem #1652

Open rbosborne opened 7 years ago

rbosborne commented 7 years ago

Using Dynamo 1.2.2 and 1.3.0

Revit 2016

See issue discussed here on Forum https://forum.dynamobim.com/t/familyinstance-type-problems/11197/4

basically - using FamilyInstance.Type fails in an odd manner due to inherited Revit Types see attached files and images

https://www.dropbox.com/s/uejjspljikyuuw2/FamilyInstanceProblem.zip?dl=0 capture

andydandy74 commented 7 years ago

Issue in 2017 as well. Also, all of those nodes (including AdaptiveComponent.Type) should just be one node using the API method @rbosborne is using here. At least there should not be two nodes for FamilyInstance that do exactly the same.

ksobon commented 7 years ago

@mjkkirschner @kronz this is a perfect example of something that should be deprecated in the next release of Dynamo. Is there a way for us to mark these nodes deprecated for the next release, replace them all with just one, Element.Type node and then two releases from now, just delete them? There is another node in the View class that should be deleted, but @kronz stated that it should stay in the repo for the time being. There needs to be a way for us to purge the code base from time to time.

ksobon commented 7 years ago

@mjkkirschner got it. [Obsolete()] attribute is just what we need. Nice. So this can be "fixed" temporarily like so:

untitled-1

The nodes are yellow because I marked all of them Obsolete. We would delete any and all GetType and Type properties. All of these nodes inherit from Element class which means Element.ElementType will work for all of them. That makes more sense.

smangarole commented 7 years ago

@mjkkirschner Ping.