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: 

Forms calling upon embedded excel

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
ksmith84
348 Views, 6 Replies

Forms calling upon embedded excel

Hello everyone. My design group is wanting to create a master pipe template which has automatically-updating iProperties based on model geometry... We have been able to link the model to the iProperties, but now want to drive the model with an embedded excel. And could the driven items be in a drop-down list? Any help on this is greatly appreciated!


~¤~
^C^CMoonwalk
6 REPLIES 6
Message 2 of 7
Jefkee
in reply to: ksmith84

So you want to fill ure multivalue parameter with a list from the excel sheet?

 

If you made a named range in excel from the list that you want to insert in the multi value list. you could use this rule

 

    'Named range name
    Dim named_range As String
    named_range = "Name"
            
    ' this is an array X*Y dimension
    rangeArray = GoExcel.NamedRangeValue(named_range) 

    'create a list to get the values of the first column
    Dim oList As ArrayList
    oList = New ArrayList

    Dim oIndex As Integer
    'rangeArray.GetLength(0)  means how many rows
    For oIndex = 1 To rangeArray.GetLength(0) 
      ' add value of each row one by one
      oList.Add(rangeArray(oIndex,1)) 
    Next 
    
    'set it to the list parameter
    MultiValue.List("Parameter name here") = oList

 

Inventor 2013
Message 3 of 7
ksmith84
in reply to: Jefkee

Thank you for the quick reply Jefkee. I should expand a little more on what I meant. Attached to this post is a screenshot of the work so far. It shows the lists generated from a simple multivalue rule (top right) and the form it is within (top left). What I mean to ask is, is it possible by the "Pipe form" to have Inventor call upon the embedded excel table (bottom center of image) where when ND and SCH are selected, it updates the model based on "Wall thickness" and "Nominal ID". The SCH multivalue is the top row of excel, and ND the Left most column.

~¤~
^C^CMoonwalk
Message 4 of 7
ksmith84
in reply to: ksmith84

One that might work are two callouts, one for SCH & Wall thickness, a second for Nominal Diameter (ND) & Nominal ID. I'll play around with this for a little.

~¤~
^C^CMoonwalk
Message 5 of 7
Jefkee
in reply to: ksmith84

I have this for a flanged connection. When i change the NORM from DIN to ANSI the multivalue list changes from a DIN size list to ANSI sizes

 

Excel selection.png

 

The size values are from a excel based list, i think it's quite the same or not? You will just have to map the value you get to the right parameter then.

Inventor 2013
Message 6 of 7
ksmith84
in reply to: Jefkee

That could work! May I see a sample code to set it up similarly here? It looks like our part has several calls: When Nominal Diameter is set to [Y] and Pipe schedule to [X], then model parameters are driven by the excel and corresponding to X & Y are part numbers and customer number... In other words, for DIN and ANSI in your example, have Pipe Material > Nominal Diameter (ND) > Pipe Schedule > Length. ND would then drive ID (excel) and Schedule would drive wall thickness (also excel). Based on these two, find part number and customer number. How would the later be done with one call?

~¤~
^C^CMoonwalk
Message 7 of 7
ksmith84
in reply to: Jefkee

We found a way to use these drop-downs. Just a couple model dims to tie in left, and it is set up! Thank you for the help Jefkee!

~¤~
^C^CMoonwalk

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

Post to forums  

Autodesk Design & Make Report