Reply
Solved! Go to solution

custom named view shortcut

Hi, I trying to create macro which will set specific named view in view manager.

I didn't find possibility to set my custom view by some keyboard shortcut directly in SE.

I can create shortcut just for View manager, but not for view.

I use two or three custom views, so my my idea is to do three macros and run them by keyboard shortcuts.

I have no idea how I can apply the named views from views manager.

I guess the "SolidEdgeFramework.View.ApplyNamedView(Object)" could possibly work, but I can't find the way how to assign the custom view to the object variable.

 

Could anyone help me?

 

Thank you

2 REPLIES
Solution
Solution
Accepted by topic author blackbird257
‎12-15-2015 04:14 AM

Re: custom named view shortcut

Simply passing the name of the view should suffice. See below.

 

[STAThread]
static void Main(string[] args)
{
    var application = SolidEdgeCommunity.SolidEdgeUtils.Connect();
    var window = (SolidEdgeFramework.Window)application.ActiveWindow;
    var view = window.View;
    view.ApplyNamedView("Test");
}
Jason Newell
Applications Architect
www.jasonnewell.net

Re: custom named view shortcut

Hi Jason, It works perfect! Smiley Happy

Thank you