Message 1 of 7
iLogic Create Model State in Part won't run again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi I have the following rule:
MessageBox.Show("START") Dim doc As PartDocument = ThisDoc.Document oPCD = doc.ComponentDefinition oMStates = oPCD.ModelStates Dim masterMS As ModelState = oMStates.Item("Master") masterMS.Activate() oMState = oMStates.Add(PartNumber) ThisDoc.ActiveModelState = "Master" PartNumber = PartNumber iLogicVb.UpdateWhenDone = True
I call this via a button in a form. On first run it works fine.
When trying to run again, ModelStateName being set to a different name, it will not execute.
The 'START' message box doesn't even appear.
Is there something wrong with my code or is this a bug??
Any advice would be great 🙂