Model States Blowing Up iLogic Rule

Model States Blowing Up iLogic Rule

chrisw01a
Collaborator Collaborator
390 Views
3 Replies
Message 1 of 4

Model States Blowing Up iLogic Rule

chrisw01a
Collaborator
Collaborator

I cannot figure out why this is creating an error.  It only happens when I add a model state to part 22222-801.ipt.  Even if it is not active, it still blows up at "flag to export" message box.  Run the rule from the assembly 22222-080.iam to cause the error.

 

Any help greatly appreciated!

0 Likes
391 Views
3 Replies
Replies (3)
Message 2 of 4

Curtis_Waguespack
Consultant
Consultant

Hi @chrisw01a ,

 

I didn't look at your files, but I suspect these are old files that had LOD and have been migrated to 2022 and model states?

 

If so, you might try deleting the former LOD ( now model state ) and recreating it from scratch, and/or looking at the solution at this link.

 

Inventor 2022 Help | The Component.IsActive function in a delegated BOM model state does not update ...

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

EESignature

0 Likes
Message 3 of 4

chrisw01a
Collaborator
Collaborator

Thanks for the reply.  I already removed the LOD code.  I'll read the article and see what I can find.

0 Likes
Message 4 of 4

chrisw01a
Collaborator
Collaborator

I don't think the Component.IsActive issue is related to this.

 

The error occurs at the "ExposedAsProperty = True"

 

'if sheet metal part, get thickness and create custom iProperty
					If oCompDef.Type = ObjectTypeEnum.kSheetMetalComponentDefinitionObject Then					
						Dim oParam As Inventor.Parameter = oCompDef.Parameters.Item("Thickness")
							If oParam IsNot Nothing Then
							MessageBox.Show("Flag to export")
							'Flag to export (creates custom iProperty)
							oParam.ExposedAsProperty = True	
							MessageBox.Show("Pause-2")	
							End If			
					End If

 

0 Likes