Loading excel data into a form

Loading excel data into a form

Anonymous
Not applicable
816 Views
2 Replies
Message 1 of 3

Loading excel data into a form

Anonymous
Not applicable

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

Accepted solutions (1)
817 Views
2 Replies
Replies (2)
Message 2 of 3

MjDeck
Autodesk
Autodesk
Accepted solution

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
Not applicable

Hello Mike

 

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

 

Tom

0 Likes