ILogic Error Message in Factory Asset (Factory Design Suite)

ILogic Error Message in Factory Asset (Factory Design Suite)

Anonymous
Not applicable
660 Views
4 Replies
Message 1 of 5

ILogic Error Message in Factory Asset (Factory Design Suite)

Anonymous
Not applicable

Hello All,

 

I am pretty new to iLogic but have managing my way. I have an Assembly that I am controlling the Levels of Detail and View Representations of using iLogic. The code that i have works when from an assembly level without any issues. My problems arise when I make this item into a Factory Asset. All the parameters come in correctly when placed into a Factory Layout. In fact i can even control any other items i set up. However, when i try to switch the parameters for the View reps or the LODs it throws me this error "The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))". Can anyone shed some light on where i am going wrong?

 

My code (might be slightly primitive, I'm still new at this) is as follows:

 

For the Levels of Detail

'Drive Size and Location
If Drive_Size_and_Location = "Default" Then
ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations("Master").Activate
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
Else If Drive_Size_and_Location = "1-2 Horsepower LH" Then
ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations("1-2 Horsepower LH").Activate
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
Else If Drive_Size_and_Location = "1-2 Horsepower RH" Then
ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations("1-2 Horsepower RH").Activate
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
Else If Drive_Size_and_Location = "3-5 Horsepower LH" Then
ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations("3-5 Horsepower LH").Activate
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
Else If Drive_Size_and_Location = "3-5 Horsepower RH" Then
ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations("3-5 Horsepower RH").Activate
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
End If

 

For the View Representations

If Setup_Planes = "Setup_Planes:Off" Then
ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.DesignViewRepresentations.Item("Setup Planes:Off").activate

iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
Else If Setup_Planes = "Setup_Planes:On" Then
ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.DesignViewRepresentations.Item("Setup Planes:On").activate

iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
Else If Setup_Planes = "Default" Then
ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.DesignViewRepresentations.Item("Master").activate

iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
End If

0 Likes
661 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

Hi.

I have the same problem.
Any ideas on how to fix this issue
I need to have an option to create an Factory Assets based on assemblies which depends on level of detail + it would be nice to have an option to manage connectors depends on used level of detail.

 

thx.

 

0 Likes
Message 3 of 5

Anonymous
Not applicable

b.galwa,

 

 i never actually figured out how to properly use the view representations and levels of detail from a Factory Design perspective. The View/LOD would work inside of Inventor but once it was made into an asset it would no longer work. I have worked around this by setting by setting up parameters and using the Component.IsActive and Component.Visible commands for Supression and Visibility.

 

 Example

 

Make a Text Parameter and name it Part_Display. Make it Multi-Value with values of "On" and "Off". Mark this Parameter as "Key"(checkbox to the right inside the parameter window) this will allow you to edit once the asset is made.

 

 

iLogic Rule:

 

    If Part_Display = "On" Then
            Component.IsActive("Part1:1") = True

    Else If Part_Display = "Off" Then

            Component.IsActive("Part1:1") = False

    End If

 

Please note the use of the occurrence number (:1 or :2 etc.) instead of using .ipt. This is because when you make an asset that has editable parameters it will save new files for every new combination that you make. When this happens the asset can no longer find Part1.ipt because the file name of the one used in each assembly has a # added to it by Factory design. If you have more questions please ask. i will answer them the best i can

 

 

 

 

Message 4 of 5

Anonymous
Not applicable

Hi.
I will try to make LOD's "manually" in logic.
But still, i dont have idea how to manage connectors to be dependent from chosen variant.
Every variant have slightly different connectors placement.
Did You find workaround for that ?

0 Likes
Message 5 of 5

Anonymous
Not applicable

b.galwa,

 

What i have done in the past to make the work is to "move the part" instead of the connector.

 

i also tried to set assets up and control the placement of the connector based on certain criteria. However, i found that when taken into AutoCAD the connectors will not move from the original location. If you have a connector attached to you part and the part moves inside of the asset the connector location will move with it, however it will not work (in my experience) if you simply try to adjust dimension that controls to connector location. Also, AutoCAD does not seem to have the ability to suppress the connectors so if you have 2 or 3 really close you would have now way to select a particular connector or shut the unneeded ones off.

 

What i did to get around this was to adjust the location constraints of the parts in relation to the connector. This avoids needing multiple connectors and seems (at least in my experience so far) to be a better, more consistent way of adjusting the location of the connector.

 

In order to set this up you would just use a separate parameter control the location of the part relative to the connector. Something like the following:

 

Connector would be located at a fixed location.

 

Part Locating Parameters:

     PositionX

     PositionY

     PositionZ

 

Connector Control Parameter:

     Connector_Loc (Multi-Value Text Parameter)

 

iLogic Rule:

 

     If Connector_Loc = "Location1" Then

          PositionX = 1.00

          PositionY = 1.00

          PositionZ = 1.00

     Else If Connector_Loc = "Location2" Then

          PositionX = 2.00

          PositionY = 2.00

          PositionZ = 2.00

     End If

 

Hope this helps! I could try and throw something together as an example if you need it but it might take me a few days to get it to you.

 

 

 

 

 

 

 

 

 

 

0 Likes