Looking for a plug-in example.

Looking for a plug-in example.

RubyRedRick
Enthusiast Enthusiast
551 Views
2 Replies
Message 1 of 3

Looking for a plug-in example.

RubyRedRick
Enthusiast
Enthusiast

I want to write a plug-in which will add to the active sketch. My use case is sketching fret locations for a stringed instrument.

 

I want to be able to select two lines which represent the nut and bridge, and use those to determine the fret positions.

 

I’ve been unable to find example code for a plug-in or a script to get me started.

 

Does anyone have any ideas?

0 Likes
552 Views
2 Replies
Replies (2)
Message 2 of 3

BrianEkins
Mentor
Mentor

When you run the Scripts and Add-Ins command, there is a "Create" button. You'll want to create a Python add-in. That will create a starting add-in. From there you'll want to read the user manual. I think what you'll want is a command that has a dialog and probably two selection inputs to let you select the nut and bridge lines. You can possibly be flexible as to whether those are sketch lines or edges of a solid. You can also add inputs for any other variables the user can specify. Finally, you can create the final geometry. You'll need to decide if this is a sketch command that would require the user to first create a sketch and then run the command while the sketch is active or is it a modeling command and the result is to create a new sketch that creates lines that represent the frets.

 

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 3

RubyRedRick
Enthusiast
Enthusiast
I know how to create one. What I need are a code example or two which take command inputs and manipulate the active sketch. None of the example I can find touch on this.
0 Likes