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: 

Template Database with User Inputs

1 REPLY 1
Reply
Message 1 of 2
bensporn
104 Views, 1 Reply

Template Database with User Inputs

Sorry if this has been asked/discussed before but I haven't found complete answers yet.

 

I have a bunch of templates I use when creating a new design.  For example, a file with a mitered box with user parameters I will use as a starting point for a credenza design.  I also have files for shelf pins that I will adjust the parameters to the interior cabinet dimension, insert it into my model, then combine them to remove the shelf pin holes.  Is it possible to access these files with the API, have the user input these parameters that need to be changed which will be applied to the template, and insert that updated template into my model?

 

For my shelf pin example I would ideally be able to click a shelf pin add-in, select cabinet edges to define the height, width, and depth, then select a corner to define the components origin for where it would be dropped in.

 

Any help or links to previous topics would be super helpful!

 

1 REPLY 1
Message 2 of 2
BrianEkins
in reply to: bensporn

What you're asking for is certainly possible. Attached is a script and some sample files that demonstrate one approach to this. To use it as-is follow these instructions:

  1. Create a new project named "SmartLibrary".
  2. Upload the "ShelfPinHoles.f3d" file to this project.
  3. Copy the ShelfPins script folder to any location on your machine.
  4. In the "Scripts and Add-ins" command, click the green plus near the top of the dialog and browse to the ShelfPins folder. This should add "ShelfPins" to the list of scripts shown in the dialog.
  5. Open the Board.f3d file and save it. You can save it anywhere, including in the SmartLibrary project.
  6. Using the "Scripts and Add-Ins" command, run the "ShelfPins" script and select the lower-left vertex on the board, as shown below. The script will then use this point to determine the orientation of the board, find the shelf-pins file, insert it and then do a Combine to remove the holes.

shelfPin.png

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

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