Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
jfenter
in reply to: Owner2229

Owner2229,

 

First, thanks for the help!  Upon loading the code you have written, I did get a return error on the follow line:

 

 

If Not MyDist(MyDist.Length - 1) Is Nothing Then

"Error on line 20:  'Is' operator does not accept operands of type 'Double'.  Operands must be reference or nullable types."

 

 

The assembly this code will work with is going to be a template assembly for the other engineers in my department to create various panels.  The panel assemblies could exist in one of three ways: 

 

1) With no inner rails at all - Single and Double Rail would be inactive

2) With one inner rail - Single rail active, double rail inactive (The x-axis position of the inner rails can vary as well as the width of the rails)

3) With two inners rails - both Single and Double rails are active (The x-axis position of the inner rails can vary as well as the width of the rails)

 

I planned on having a single measurement rule to run controlled by a Case statement for each panel type, but again, if there is a better way I'm all for it.  The work plane names won't change, but they will toggle on and off with each different panel type.  I should also mention the corresponding rails are created as solid bodies, but since the measurement is between the work planes I don't think that should matter.  This rule would run as a check to be sure that each of the dimensions exceed the honeycomb minimum of 230mm.  If any one of the dimensions would be less than 230, the message box would pop up to alert the user to change parameters to an acceptable distance.  The message box would not have to specifically call out which dimension is at fault, simply just notify the user of the discrepancy.

 

I'd also like to ask where I can get more information about the specific code you're writing.  I have limited iLogic experience and no Visual Basic experience at all.  Most of the code you have written I do not understand.