iLogic Subassemblies won't update unless in their own environment.

iLogic Subassemblies won't update unless in their own environment.

Anonymous
Not applicable
2,418 Views
7 Replies
Message 1 of 8

iLogic Subassemblies won't update unless in their own environment.

Anonymous
Not applicable

I have an assembly which is made with a sub assembly. The sub assembly has iLogic code that both resizes it's parts and suppresses parts that arn't needed after a change in length.

 
If I open the sub assembly in it's own environment, the rule runs and it assumes the correct size and configuration, based on the parameters passed to it from the top level assembly.
 
However if I don't open the sub assembly into it's own environment, the parameters are successfully passed on, but the rule doesn't run and the sub assembly stays the wrong length.
 
I've tried all the kinds of document update I know, but nothing is working.
 
 
Hope someone can help 🙂
 
Cheers
 
GavoGarmo
Accepted solutions (1)
2,419 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable

@ GavoGarmo

 

Maybe not what you're looking for but I used iLogic to control the top level assembly which passes parameters down from GA to parts and GA to subs to parts by adding a "Link Parameters" Rule to the GA and each sub.

 

Hope that helps

 

LL

0 Likes
Message 3 of 8

Anonymous
Not applicable

Hi Lewis,

 

Thanks for the reply, but the parameters are linking up OK, and being passed across at the right time. The problem is getting the assembly to update after the parameters have been passed across. I think I might have worked it out though and will get to try a solution this morning. If it works I'll repost with details of what I did.

 

Cheers

 

GavoGarmo

0 Likes
Message 4 of 8

Anonymous
Not applicable

I had a similar problem. Try the rebuild command in a main assembly rule, worked for me.

 

ThisApplication.ActiveDocument.Rebuild2 (True)

 

Good Luck

LL

0 Likes
Message 5 of 8

Anonymous
Not applicable

Thanks again Lewis, but it doesn't seem like anything's going to work!  I can't even get the forum site to upload my code so people could take a look. I'm doomed! 🙂

0 Likes
Message 6 of 8

Anonymous
Not applicable
Accepted solution

Fixed it. But I don't think it's a problem many other people would have. We started using the following snippet to "lock" the LOD as (iLogic). We don't intend to use LOD's for their main function, but instead just want to utilise iLogic suppression within our assemblies.

 

 

'Keeps LOD as "iLogic"
Dim CurrentDoc as AssemblyDocument = ThisDoc.Document 
If (Not (CurrentDoc Is ThisApplication.ActiveDocument)) Then Return

Dim doc as AssemblyDocument = ThisDoc.Document
'If doc.ComponentDefinition.RepresentationsManager.ActiveLevelOfDetailRepresentation.Name <> "iLogic" Then

Dim oLOD As LevelOfDetailRepresentation 
Dim oAsmCompDef As ComponentDefinition 
oAsmCompDef = doc.ComponentDefinition
 Try
  oLOD = oAsmCompDef.RepresentationsManager.LevelOfDetailRepresentations.Item("iLogic").Activate(True)
  Catch
  Dim nLOD As LevelOfDetailRepresentation
  nLOD = oAsmCompDef.RepresentationsManager.LevelOfDetailRepresentations.Add("iLogic")
  oLOD = oAsmCompDef.RepresentationsManager.LevelOfDetailRepresentations.Item("iLogic").Activate(True)
 End Try

End If

 

The line in Red was the problem. Commented it out and now the assemblies work fine.

 

This might help someone as I got the snippet from the forum, and I doubt I'm the only person that used it.

 

Thanks again to anyone who had a ponder on my behalf.

 

Gavo Garmo

 

 

Message 7 of 8

RoyWickrama_RWEI
Advisor
Advisor

I got the sme problem, and your iogic in this postimg helped me. Then I deleted this iLogic and the iLogic rule and the LOD created in the assembly. But, to my surprise, the the assebly is still doing well.

 

Thanks a lot.

 

Roy Wickrama

0 Likes
Message 8 of 8

RoyWickrama_RWEI
Advisor
Advisor

Today, I also got the same problem. Your ilogic in this postimg helped me. Then I deleted the iLogic created in the assembly and deleted the ilogic LOD (created in the assembly by ilogic itself) as well. But, to my surprise, the the assebly keepd doing well repeatedly.

 

Thanks a lot.

 

Roy Wickrama

0 Likes