Hello,
I have a template that I have created, in it I have a rule that changes the stock number and description based on which sheet metal rule is selected. The weird thing is it works correctly if the first sketch is a rectangle. If you sketch a circular shape and make that the face it will not work. It blanks out the values for the stock number and description.
I'm running Inventor 2014 update 2.
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 33212 StartFragment: 314 EndFragment: 33180 StartSelection: 314 EndSelection: 314
SyntaxEditor Code Snippet
DimiPropValAsString=""
DimiPropDesAsString=""
SelectCaseSheetMetal.GetActiveStyle()
Case"11 GA ASTM A 36 Plate"iPropVal="140010"iPropDes="HR Plate"
Case"1/4"" ASTM A 36 Plate"iPropVal="140040"iPropDes="HR Plate"
Case"5/16"" ASTM A 36 Plate"iPropVal="140060"iPropDes="HR Plate"
Case"3/8"" ASTM A 36 Plate"iPropVal="140100"iPropDes="HR Plate"
Case"7/16"" ASTM A 36 Plate"iPropVal="140105"iPropDes="HR Plate"
Case"1/2"" ASTM A 36 Plate"iPropVal="140130"iPropDes="HR Plate"
Case"5/8"" ASTM A 36 Plate"iPropVal="140140"iPropDes="HR Plate"
Case"3/4"" ASTM A 36 Plate"iPropVal="140150"iPropDes="HR Plate"
Case"7/8"" ASTM A 36 Plate"iPropVal="140160"iPropDes="HR Plate"
Case"1"" ASTM A 36 Plate"iPropVal="140170"iPropDes="HR Plate"
Case"1 1/8"" ASTM A 36 Plate"iPropVal="140175"iPropDes="HR Plate"
Case"1/4"" AR Plate"iPropVal="140035"iPropDes="AR Plate"
Case"3/8"" AR Plate"iPropVal="140080"iPropDes="AR Plate"
Case"1/2"" AR Plate"iPropVal="140135"iPropDes="AR Plate"
Case"3/4"" AR Plate"iPropVal="140152"iPropDes="AR Plate"
Case"3/8"" (1020)HR Plate"iPropVal="140101"iPropDes="1020 Plate"
Case"1/2"" (1020)HR Plate"iPropVal="140131"iPropDes="1020 Plate"
Case"5/8"" (1020)HR Plate"iPropVal="140141"iPropDes="1020 Plate"
Case"3/4"" (1020)HR Plate"iPropVal="140151"iPropDes="1020 Plate"
Case"1"" (1020)HR Plate"iPropVal="140171"iPropDes="1020 Plate"
Case"1 1/8"" (1020)HR Plate"iPropVal="140176"iPropDes="1020 Plate"
Case"1 1/4"" (1020)HR Plate"iPropVal="140180"iPropDes="1020 Plate"
Case"1 3/8"" (1020)HR Plate"iPropVal="140181"iPropDes="1020 Plate"
Case"1 1/2"" (1020)HR Plate"iPropVal="140190"iPropDes="1020 Plate"
Case"1 3/4"" (1020)HR Plate"iPropVal="140200"iPropDes="1020 Plate"
Case"2"" (1020)HR Plate"iPropVal="140210"iPropDes="1020 Plate"
Case"2 1/4"" (1020)HR Plate"iPropVal="140211"iPropDes="1020 Plate"
Case"2 1/2"" (1020)HR Plate"iPropVal="140212"iPropDes="1020 Plate"
Case"1/4"" SS Plate"iPropVal="140041"iPropDes="SS Plate"
Case"3/4"" SS Plate"iPropVal="140075"iPropDes="SS Plate"
EndSelect
iProperties.Value("Project", "Stock Number")=iPropVal
iProperties.Value("Project", "Description")=iPropDes
InventorVb.DocumentUpdate()
Hi ThomasSwanson,
It is very hard to diagnose without a reproducible sample. The code snippet does not tell the context how the problem occurs. Could you share the file you are testing and describe more about the steps? Thanks!