Welcome to the COE Discussion Forum! 

 

To participate in the discussion forum, you must be logged in to the website.  If you forget your login information, please contact COE Headquarters at coe@coe.org or (800) 263-2255.

If you are new to the COE Discussion Forum and would like to participate, please register.


Register Today
COE 2009 Annual PLM Conference & TechniFair

COE DISCUSSION FORUM
Subject: Multi-value Rule Activation Through Code

You are not authorized to post a reply.   
Author Messages
SKWOK

12 Nov 2007 03:08 AM
I have a problem I'm trying to solve. Sadly, I should have posted this weeks ago, because now I'm likely to have to force a workaround. My problem is that I have created a multi-value parameter that I need to change through code. Based on this value, I have a rule that fires that controls all of my formulas. Through code I can push the correct "string" value into this multi-value parameter, but CATIA doesn't see it as the correct multi-value selection. Therefore the rule won't fire, and while CATIA displays the "correct string", it still thinks I have the original option selected. If that doesn't make sense, I have:

Parameter (with two values): UseEquations
Value 1: Basic
Value 2: Advanced
Value 3: Expert

The part is saved with Value1, so CATIA would show:
UseEquations = Basic

Through VB i push in the string "Advanced", update, and save the part.

When I view the part I will see:
UseEquations = Advanced

However, if i select the dropdown menu, instead of having the section option actually selected, it still has option one selected, and will reselect option one. Furthermore, even with the parameter showing "Advanced" CATIA still sees option one and does not update based on my advanced rule. Can I pass Item(2) to CATIA for multi-value parameters instead of ValuateAsString? How else do I get around this? The idea is that users can change this through code OR after code execution. For now I'll have to change it from multi-value to single value and just disallow users to change it. Thanks for any insight.

Steven Kwok
PLM Solutions Consultant
CATIA V5 Instructor
TechniGraphics Inc.
CATIA V5 R16/17/18/19
CATVBA
VB 6.0
Visual Basic .NET 2003/2005
You are not authorized to post a reply.
Forums > COE Forums > CATIA V5 Programming > Multi-value Rule Activation Through Code



ActiveForums 3.6

    

401 North Michigan Avenue, Chicago, IL 60611-4267 | (312) 321-5153 | (800) COE-CALL (U.S.)