Twullf
Mechanical
- Jan 24, 2012
- 196
I have a recorded journal, which I simplified and successfully tested. the section in question reads as follows:
I wish to pass an array of values, so I changed it in my program as follows:
The code successfully appears to complete everything up to the message box saying "Rule4 Set." However where the previous code had no problem with the commitCreateOnTheFly now it fails.
I was hoping that the values would be set in the array and using the DumbRule multiple times would not make a difference, but suspect that is where I'm failing.
Does rules4(0) = faceDumbRule2 actually save the variable name? so each instance of Rules4() have to have an individual variable left alone for it to access? Or does my problem lie else where.
Thank you for your time.
Code:
scCollector2 = extractFaceBuilder3.FaceChain
faces2(0) = face1
faceDumbRule2 = workPart.ScRuleFactory.CreateRuleFaceDumb(faces2)
faces3(0) = face3
faceDumbRule3 = workPart.ScRuleFactory.CreateRuleFaceDumb(faces3)
rules4(0) = faceDumbRule2
rules4(1) = faceDumbRule3
scCollector2.ReplaceRules(rules4, False)
extractFaceBuilder3.FixAtCurrentTimestamp = True
feature3 = extractFaceBuilder3.CommitCreateOnTheFly()
I wish to pass an array of values, so I changed it in my program as follows:
Code:
scCollector2 = extractFaceBuilder3.FaceChain
itm2 = checkFace.Length - 1
Dim rules4(itm2) As SelectionIntentRule
For itm1 = 0 To itm2
faces1(0) = checkFace(itm1)
faceDumbRule1 = workPart.scRuleFactory.CreateRuleFaceDumb(faces1)
rules4(itm1) = faceDumbRule1
Next itm1
msgbox("Rule4 Set")
scCollector2.ReplaceRules(rules4, False)
extractFaceBuilder3.FixAtCurrentTimestamp = True
feature3 = extractFaceBuilder3.CommitCreateOnTheFly()
The code successfully appears to complete everything up to the message box saying "Rule4 Set." However where the previous code had no problem with the commitCreateOnTheFly now it fails.
I was hoping that the values would be set in the array and using the DumbRule multiple times would not make a difference, but suspect that is where I'm failing.
Does rules4(0) = faceDumbRule2 actually save the variable name? so each instance of Rules4() have to have an individual variable left alone for it to access? Or does my problem lie else where.
Thank you for your time.