Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exculde template view during View3d wrapping #1239

Merged
merged 2 commits into from
Sep 1, 2016
Merged

Conversation

QilongTang
Copy link
Contributor

@QilongTang QilongTang commented Aug 31, 2016

Purpose

MAGN-5431 All Elements Of Type throws exception when handling views. Calling IsPerspective() on 3Dviews with IsTemplate marked as true will return exception instead of true/ false. This is idea but waiting for Revit API guild to response the reason behind that. As an attempt to fix on our side, we should avoid such query on template views so the graph can still execute. Added such case in unit tests so we could catch it when it's broken again later.

Declarations

Check these if you believe they are true

  • The code base is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • Snapshot of UI changes, if any.

New results filtering out views:
image

Reviewers

@sm6srw

FYIs

@mjkkirschner

}
return null;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am hesitate to wrap template 3dViews to whatever since that wrapping seems to always success that we might wrapped them to wrong dynamo types without the right query from IsPerspective(). I am returning null, as a result, they will appear "null" in the list of watch node. let me know if this is a bad idea.

@QilongTang QilongTang changed the title View3 d wrapping Exculde template view during View3d wrapping Aug 31, 2016
// ElementsOfCategories & Views, as output of Categories
// passed to ElementsOFCategory
var elementsOfViewNodeID = "2569434a-b34f-4512-a4fe-f065c7a10175";
AssertPreviewCount(elementsOfViewNodeID, 33);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new case filtering out all views in the sample.rvt, since template views will appear null, by pass the null check.

@sm6srw
Copy link
Contributor

sm6srw commented Sep 1, 2016

LGTM

@sm6srw sm6srw added the LGTM Lets Get This Merged label Sep 1, 2016
@sm6srw sm6srw merged commit 4dc8bd2 into Revit2018 Sep 1, 2016
@QilongTang QilongTang deleted the View3DWrapping branch September 1, 2016 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM Lets Get This Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants