Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Loading excel data into a form

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
552 Views, 2 Replies

Loading excel data into a form

Hello everyone

 

I'm currently working with a model in which I need to easily change the parameters for. What I've done so far is make a form through iLogic and used that to alter my parameters. That has worked just fine, but now I would like the ability to import certain "sets" from an excel spreadsheet, which has pre-defined parameters, into my form. I was thinking of having a drop-down menu where you can choose a set based on the set name and the pre-defined set parameters would then load into the form and by clicking Apply it would apply them to the model. I've attached a picture of a simple model where you can see my form and model. Where it says Group 1 is where I was thinking of having the different set names, and they would then be loaded into the Height and Wall Thickness input boxes when you've chosen which set you want to use. In Excel I've made a spreadsheet with each set looking like this:

 

Design 1

Height               1000

Wall thickness   10

 

Design 2

Height                1200

Wall thickness   12

 

etc.

 

The picture of my model:

 

ParameterChanger.jpg

 

 

My question is then, how can I accomplish this? I'm not that good at VBA, so I wouldn't know how to write a code that could do this for me.

 

Any help appreciated

Tom

2 REPLIES 2
Message 2 of 3
MjDeck
in reply to: Anonymous

Tom,

 Here is a sample part and Excel file that does something like what you want.  In the form, you select a value for the Design parameter.  That will trigger a rule to look up values for the Height and WallThickness parameters.  These are marked as ReadOnly on the form, so that their values are set only by changes to the Design parameter.  One drawback to this method is that you can't use an Apply button.  Changes to the Design parameter have to be propagated immediately to the part in order to run the rule and get the correct values for Height and WallThickness.  Here's a screenshot:

ParameterChanged-ExcelForm.png


Mike Deck
Software Developer
Autodesk, Inc.

Message 3 of 3
Anonymous
in reply to: MjDeck

Hello Mike

 

This is exactly what I was looking for. Thank you very much!

 

Tom

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

Post to forums  

Autodesk Design & Make Report