' False 'Fires rule when "iTrigger" icon is clicked trigger = iTrigger0 question = MessageBox.Show("Do you want to run the LV assembly editor?", "Assembly Editor",MessageBoxButtons.YesNo,MessageBoxIcon.Question) 'set condition based on answer If question = vbNo Exit Sub End If 'Return view to Home view ThisApplication.CommandManager.ControlDefinitions.Item _ ("AppViewCubeHomeCmd").Execute ThisApplication.ActiveView.Fit 'ignores errors and continues on with the code On Error Resume Next Component.Color("BUSBAR_ASSEMBLY")="Red(FLAT)" Parameter("busbar_assembly_partno") = InputListBox("Please select the part number of the busbar assembly you wish to use", MultiValue.List("busbar_assembly_partno"), MultiValue.List("busbar_assembly_partno"), Title := "Assembly Editor", ListName := "Busbar Assembly") Component.Color("BUSBAR_ASSEMBLY")="As Material" iPart.ChangeRow("BUSBAR_ASSEMBLY", Parameter("busbar_assembly_partno")) iLogicVb.UpdateWhenDone = True 'Check to see if the part has changed. If it hasn't, check to see if it exists. If Parameter("busbar_assembly_partno") <> iProperties.Value("BUSBAR_ASSEMBLY", "Project", "Part Number") If Dir("C:\ARTICULATE\09\090\09090GT0000023\" & Parameter("busbar_assembly_partno") & ".iam") = "" Then MessageBox.Show("The busbar assembly, "& Parameter("busbar_assembly_partno") &", does not exist locally. Please GET the part from Vault (you don't need to check it out) then click 'OK'", "Assembly Editor", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1) iPart.ChangeRow("BUSBAR_ASSEMBLY", Parameter("busbar_assembly_partno")) MessageBox.Show("Now please Check , "& Parameter("busbar_assembly_partno") &", back in", "Assembly Editor", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1) End If End If 'Check to see of the part has changed. If it hasn't, prompt to check it out of vault. If Parameter("busbar_assembly_partno") <> iProperties.Value("BUSBAR_ASSEMBLY", "Project", "Part Number") MessageBox.Show("The busbar assembly could not be changed to "& Parameter("busbar_assembly_partno") &". Make sure you have the latest version of the file and all it's children from Vault then click 'OK'", "Assembly Editor", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1) iPart.ChangeRow("BUSBAR_ASSEMBLY", Parameter("busbar_assembly_partno")) End If 'Check to see of the part has changed. If Parameter("busbar_assembly_partno") <> iProperties.Value("BUSBAR_ASSEMBLY", "Project", "Part Number") MessageBox.Show("The busbar assembly could still not be changed to "& Parameter("busbar_assembly_partno") &". iAssemblies are jerks", "Assembly Editor", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1) End If 'Component.Replace("BUSBAR_ASSEMBLY","C:\ARTICULATE\09\090\09090GT0000023\" & Parameter("busbar_assembly_partno") & ".iam", True)