Skip to content

Conversation

@reddyashish
Copy link
Contributor

When TuneUp package is installed, "Show TuneUp" menu item should be present under the Extensions menu.

To use the AddExtensionMenuItem API from ViewLoadedParams class, the DynamoCore references are pointed to the Dynamo 2.12 version. The TargetFrameworkVersion is also set to v4.8.

Screen Shot 2021-07-23 at 8 44 03 AM


};
p.AddMenuItem(MenuBarType.View, TuneUpMenuItem);
p.AddExtensionMenuItem(TuneUpMenuItem);
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm can you test loading this view ex in legacy version of Dynamo? I think part of the AC is that if user download newer version of TuneUp in older version of Dynamo e.g. 2.6.1, Dynamo should not crash when loading TuneUp. This code may crash in older version of Dynamo, we may need to wrap this code in try catch and fall back to the older version of API

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Address this issue in the latest commit.

@reddyashish
Copy link
Contributor Author

reddyashish commented Jul 30, 2021

@QilongTang After discussing with @mjkkirschner, found out that by using Dynamic ViewLoadedParams object we can call the respective API's. Tested it on latest master as well as older versions of Dynamo.

Latest master:
Screen Shot 2021-07-30 at 1 48 33 PM

2.11 and older versions of Dynamo:
Screen Shot 2021-07-30 at 1 48 41 PM

public void Loaded(ViewLoadedParams p)
public override void Loaded(ViewLoadedParams p)
{
dynamic dp = (dynamic) p;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add comments to this?

Copy link
Contributor

@QilongTang QilongTang left a comment

Choose a reason for hiding this comment

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

One comment then LGTM

@reddyashish
Copy link
Contributor Author

Addressed all comments. Merging this.

@reddyashish reddyashish merged commit 5e74307 into DynamoDS:master Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants