Question on Dumb Rules in journals
Question on Dumb Rules in journals
(OP)
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 --> vb
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 --> vb
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.





RE: Question on Dumb Rules in journals
CODE
If you are looking to create multiple extract face features, then this approach may not work...
www.nxjournaling.com
RE: Question on Dumb Rules in journals
I'm going to be using the intersection curve to measure the distance between two sheet bodies on a complex surface and need to be able to move it through the length of the part without having to reselect.
thanks
RE: Question on Dumb Rules in journals
I'm not sure this is entirely due to this section of code anymore as I discovered that the code I thought was working, which I simplified from the recorded journal, is not creating an intersection curve but instead creating a spline.
Further investigation proceeding to see if I can narrow down the issue.
RE: Question on Dumb Rules in journals
www.nxjournaling.com
RE: Question on Dumb Rules in journals
I'm near the point of posting the whole sub to see if some one else can find what I have forgotten.
thanks for your help.