Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a rule (with the help from many on this forum) that actually runs multiple rules back to back, all of the iProperties created need to be linked to a common number 1,2,3....what I have works however I think it could be easier and a bit more intuitive. There will be several other Rules added along the way to create other iProperties/Values
Dim oDoc As Document = ThisDoc.Document Dim CustTypeWC As New ArrayList CustTypeWC.Add("WC A01 Engineer") CustTypeWC.Add("WC C02 Laser / Punch") CustTypeWC.Add("WC D01 Debur") CustTypeWC.Add("WC E01 Form") CustTypeWC.Add("WC E02 Panel Bender") CustTypeWC.Add("WC E03 Roll") CustTypeWC.Add("WC F01 Robotic Cell") CustTypeWC.Add("WC G01 Pem Insert") CustTypeWC.Add("WC H01 Weld / Grind") CustTypeWC.Add("WC I01 Spot Weld") CustTypeWC.Add("WC J01 Grind") CustTypeWC.Add("WC K01 Powder Coat") CustTypeWC.Add("WC L01 Mask / Plug") CustTypeWC.Add("WC M01 Package") CustTypeWC.Add("WC N01 Assemble") CustTypeWC.Add("WC Q01 Quality") CustTypeWC.Add("WC Z01 Anodize") CustTypeWC.Add("WC Z02 Chemical Film") CustTypeWC.Add("WC Z03 Plate") CustTypeWC.Add("WC Z04 Silk Screen") CustTypeWC.Add("WC Z05 Stamp") CustTypeWC.Add("WC Z06 Strip") CustTypeWC.Add("WC Z07 Sub Assemble") CustTypeWC.Add("WC Z08 Sub Labor") CustTypeWC.Add("WC Z09 Sub Weld") Dim oSelCustTypeWC As String = InputListBox("Select Operation", CustTypeWC, oOperation1, Title := "Select Work Center", ListName := "Work Center") 'if this custom property doesn't exist, this next line will also create it if needed (no error shown) iProperties.Value("Custom", "Operation" & Space(1) & InputBox("Input Operation Number", "Operation Number?", 0)) = oSelCustTypeWC iProperties.Value("Custom", "Setup Time" & Space(1) & InputBox("Input Setup Instance", "If Operation 1 Enter 1", 0)) = CObj(InputBox("Enter Setup Time(Enter 0 if no value is available)", "Setup Time", 30)) Dim CustTypeMC As New ArrayList CustTypeMC.Add("M A01 Eng 1") CustTypeMC.Add("M C02 Laser / Punch") CustTypeMC.Add("M D01 Debur") CustTypeMC.Add("M E01 Form") CustTypeMC.Add("M E02 Panel Bender") CustTypeMC.Add("M E03 Roll") CustTypeMC.Add("M F01 Robotic Cell") CustTypeMC.Add("M G01 Pem Insert") CustTypeMC.Add("M H01 Weld / Grind") CustTypeMC.Add("M I01 Spot Weld") CustTypeMC.Add("M J01 Grind") CustTypeMC.Add("M K01 Gas Fired Powder Coat") CustTypeMC.Add("M K02 Infrared Powder Coat") CustTypeMC.Add("M L01 Mask / Plug") CustTypeMC.Add("M M01 Package") CustTypeMC.Add("M N01 Assemble") CustTypeMC.Add("M Q01 Quality") CustTypeMC.Add("M Z01 Anodize") CustTypeMC.Add("M Z02 Chemical Film") CustTypeMC.Add("M Z03 Plate") CustTypeMC.Add("M Z04 Silk Screen") CustTypeMC.Add("M Z05 Stamp") CustTypeMC.Add("M Z06 Strip") CustTypeMC.Add("M Z07 Sub Assemble") CustTypeMC.Add("M Z08 Sub Labor") CustTypeMC.Add("M Z09 Sub Weld") Dim oSelCustTypeMC As String = InputListBox("Select Operation", CustTypeMC, oMachineCode1, Title := "Select Machine Code", ListName := "Machine Code") 'if this custom property doesn't exist, this next line will also create it if needed (no error shown) iProperties.Value("Custom", "Machine Code" & Space(1) & InPutBox("Input Machine Code Instance, If Operation 1 Enter 1", "Machine Code Instance?", 0)) = oSelCustTypeMC iProperties.Value("Custom", "Run Time" & Space(1) & InputBox("Input Run Instance", "If Operation 1 Enter 1", 0)) = CObj(InputBox("Enter Run Time(Enter 0 if no value is available)", "Run Time", 0.12)) Dim CustTypeSubPO As New ArrayList CustTypeSubPO.Add("Anodize-" & iProperties.Value("Custom", "Drawing Number")) CustTypeSubPO.Add("Irridite-" & iProperties.Value("Custom", "Drawing Number")) CustTypeSubPO.Add("Plating-" & iProperties.Value("Custom", "Drawing Number")) CustTypeSubPO.Add("Silk Screen-" & iProperties.Value("Custom", "Drawing Number")) CustTypeSubPO.Add("Stamp-" & iProperties.Value("Custom", "Drawing Number")) CustTypeSubPO.Add("Sub Labor-" & iProperties.Value("Custom", "Drawing Number")) Dim oSelCustTypeSubPO As String = InputListBox("Select P/Order Stock Code 1", CustTypeSubPO, SubPOStockCode1, Title := "P/Order Stock Code Selector 1", ListName := "P/Order Stock Code 1") 'if this custom property doesn't exist, this next line will also create it if needed (no error shown) iProperties.Value("Custom", "P/Order Stock Code 1") = oSelCustTypeSubPO
Thanks,
Brent
Solved! Go to Solution.