Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Shaded/Wireframe Shortcut Macro

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
sultan99
9360 Views, 9 Replies

Shaded/Wireframe Shortcut Macro

 
Could someone please help me with a Macros to toggle between Shaded view and Wireframe view with a shortcut key? 
 
wireframe.png
9 REPLIES 9
Message 2 of 10
marshaltu
in reply to: sultan99

Hello,

 

Unfortunately there was no API to support setting shortcut key. I would like to recommend you log a request in our ideastation and then our product management team could review the requirement and other users could also vote on that.

 

http://forums.autodesk.com/t5/ideastation-request-a-feature-or/idb-p/125

 

Thanks,

Marshal



Marshal Tu
Fusion 360 Developer
Autodesk, Inc.

Message 3 of 10
ekinsb
in reply to: marshaltu

As Marshal said, Fusion doesn't currently support custom shortcut keys, from either from the user-interface or the API.

 

It's not a shortcut key, but I wrote a simple add-in that creates a new button next to the "Display Settings" command that toggles the display between wireframe and shaded.  You can get the add-in here.

 

ToggleDisplay.png

 

After a bit of research it looks like it might be possible to catch the keyboard events at a low level and react to that, which would essentally allow you to implement shortcut keys on your own.  Here's one post I found that discusses this, (http://stackoverflow.com/questions/9817531/applying-low-level-keyboard-hooks-with-python-and-setwind... However, this is Windows specific.  There were also some posts for OSX, but it looks like it would have to be a different implementation for Windows and Mac.

 

 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 4 of 10
sultan99
in reply to: ekinsb

Hi @ekinsb!

Perfect, it can be used with autohotkey and gives the wanted result.

 

Autohotkey code:

 

F1::
IfWinActive, Autodesk Fusion 360 
{
  Send, s
  SendInput toggle{Enter}
  return
}

By pressing F1 it toogle view. 

 

 

Thank you for your add-in, I accepted your post as solution.

 

Sure it requires a builtin customizable shortcut feature in fusion 360.

Message 5 of 10
lian_xie
in reply to: ekinsb

Hi Brian,

Is it possible to create an Add-In for Inventor to toggle the display settings?

If so, could you please show an example?

Thanks a lot, Lian

Message 6 of 10
tugbakoc
in reply to: sultan99

Hello,

 

İ have a problem like this.

I want to display a sphere at wireframe mode but the program does not do it as desired.  when I want to the sphere more detailed, program displays just a  circle. How can I solve this problem?

Please help me, thanks.

Message 7 of 10
tugbakoc
in reply to: tugbakoc

okey, i  solved it. 🙂

Message 8 of 10
polygrinder
in reply to: ekinsb

Brian,

 

This is a great Add In. However, I am wanting to be able to toggle between "Shaded" and "Shaded with Wireframe". I tried to modify your Add in to but to no avail. I just don't have the coding knowledge. Would it be too much to ask for you to modify and post a version that would accomplish that task.

 

Thanks,

Micheal

Message 9 of 10
omar
in reply to: ekinsb

What is the icon at the end? It looks like a white sideways christmas tree.

Message 10 of 10
jade.fink
in reply to: polygrinder

In case you're still wondering about turning on hidden edges with Brian's add-in, change the if statement in MyCommandCreatedHandler.notify to:

 

        if currentStyle == 2:
            # Set to wireframe.
            app.activeViewport.visualStyle = 1
        else:
            # Set to shaded with visible edges.
            app.activeViewport.visualStyle = 2 # Is actually shaded with visible edges only.

The comments might be completely meaningless, as the docs are wrong and this was figured out with trial and error. Broken docs here: https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-b821dca0-874b-49ca-8c37-59f7b22bfc6f

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report