DynamoDS / DynamoRevit

Dynamo Libraries for Revit
https://dynamobim.org
333 stars 186 forks source link

DynamoRevit dealing badly with 3D view templates #1636

Open andydandy74 opened 7 years ago

andydandy74 commented 7 years ago

Dynamo version

1.2.3.592

Revit version

2017.1

Operating system

Win 7

What did you do?

Ran All Elements of Type on View3D types.

What did you expect to see?

A list of all 3D views, hopefully including view templates

What did you see instead?

3dviewtemplatesreturnedasnull The last two items are 3D view templates and return null (to reproduce run these nodes on the basic architectural sample that ships with Revit). The same thing happens when running All Elements of Category on category Views, btw. Admittedly, this is better than the original bug (https://github.com/DynamoDS/Dynamo/issues/2970), but it would obviously be better if these nodes wouldn't return null and even better yet if they would actually return 3D view templates as well (view templates for all other view types are returned).

ksobon commented 7 years ago

@andydandy74 we would have to do a small refactor of the 3dView class internally to make this work but it's possible:

image

@mjkkirschner I had to rename the original 3d view class to Abstract3DView since PerspectiveView and AxonometricView both inherit from it. I also created it's own 3DView wrapper so that we can handle things that are 3d view but are not either perspective nor axonometric: 3d view template. Also changed a few things around with the ToDSType() call to stop skipping view templates.

Let me know what you think. Cheers!

andydandy74 commented 7 years ago

Nice work

ksobon commented 5 years ago

@kronz can we close this issue? Fix was merged. Thanks!

kronz commented 5 years ago

FYI @AndyDu1985

AndyDu1985 commented 5 years ago

We would merge the 3dview-wrapper commits after version 3.x. Track it with link: #2290 .