Thursday, February 16, 2017

iLogic - Dynamic MultiValue Parameter Lists "Filtered" By Current Selected Value

Issue:
You want to "filter" a list (List B) based on the selection from another list (List A), but the lists are long and writing the If/Then or Select Case statements are repetitive, and difficult to maintain. Is there a better way?

Solution:
You can use ArrayLists and For Each Statements to do this, as shown in this example.

Here an illogic form is used, and when a value is selected from List A, then List B and C are reset to include only values less than or equal to the current selected List A value.



Example file:
Dynamic MultiValue Lists iLogic 2015.ipt ‏68 KB    

SyntaxEditor Code Snippet
Example code:

'reset List B list to default
MultiValue.SetList("List_B", 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)

'reset List C list to default
MultiValue.SetList("List_C", 2,4,6,8,10,12,14,16)

Dim B_List As New ArrayList
B_List = MultiValue.List("List_B")

Dim C_List As New ArrayList
C_List = MultiValue.List("List_C")

Dim Temp_List As New ArrayList

Temp_List.Clear
For Each oItem in B_List
    If List_A >= oItem Then
        Temp_List.Add(oItem)
    End If
Next

MultiValue.List("List_B") = Temp_List

Temp_List.Clear
For Each oItem in C_List
    If List_A >= oItem Then
        Temp_List.Add(oItem)
    End If
Next

MultiValue.List("List_C") = Temp_List

Friday, February 10, 2017

Hybrid Wireframe and Shaded Views in Autodesk Inventor




Issue:
You want to create a view on your drawing that has some parts shaded and some that look wire-framed, so you can show some particular detail of your assembly in your detailed drawing.


In the past you could do it as described in tip #1 at this link, but that seems not to work now.
http://inventortrenches.blogspot.com/2011/06/autodesk-inventor-tips-from-around-web.html

Solution:
Here is another way to do this.

Create one new Positional Representation ( no need to do anything else with it, other than creating it).
  • Create 2 View Representations
  • In View Representation 1, turn off the visibility of the part you want to show wireframe
  • In View Representation 2, turn off the visibility of everything else
  • Create a drawing Base View and set it to use View Representation 2
  • Create an Overlay View, and set it to use the Positional Representation and View Representation 1
  • In the Overlay View dialog box set the style to be not shaded & hidden lines removed
  • And also in the Overlay View dialog box set the Layer dropdown to be 'As Parts'.


  • Here's a link to a quick video I created, but I think the CADLine blog has covered this better at this link:
    https://www.cadlinecommunity.co.uk/hc/en-us/articles/115001863349-Inventor-Partial-Shaded-Drawings