Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove component in PTS on condition

Status
Not open for further replies.

PrintScaffold

Mechanical
Sep 8, 2006
453
Hello everyone!

I'm trying implement a simple visual rule in PTS, but so far I haven't been successful. Let's take a simple case for example - if n < 2, then remove given component. As far as I know, I need to create a rule to remove a component, and then create a different rule with a conditional check invoking first rule if n is less than 2. But it doesn't work for me, PTS keep giving some error messages (that I cannot yet decipher because of my limited experience with PTS) and doesn't even allow to save a template. Could you please help?

 
Replies continue below

Recommended for you

Love to help. Can you post a picture of what you've done so far?

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
 
Hi Taylor!

This is a generic example of what I'm trying to build - see the screenshots and attached .zip. The container file is PTS-enabled and hold two components. PTS interface has a drop-down list with two options - 1 and 2. If user picks 2, both components remain, if he picks 1, Component 2 is removed.
As far as I see, Remove rule seems to be working. The problem is with the conditional rule.

ss1_drlqi8.png

ss2_iq0vqu.png


www.cadroad.com
 
My apologies, PrintScaffold... On the road a lot lately.

>> why they do not work at all? :)

Well, if you're going to go there... ;-) When they don't work, it's almost always a PBCAK error. :-D

So, a couple of things I notice above:

a) In your conditional, you need an action for the right side to perform. Right now it's siting there empty, and that's not going to go well. If there's nothing you want to happen when a>=2, then you can create a simple DoNothing rule for this:

URL]


...and then your conditional will look like this in the end:

URL]


b) Your "Remove" rule looks great. :) And the fact that you've got it showing up in your conditional lets me know that you successfully checked the "Invoked From Visual Rule" toggle as you created it. Be sure to do the same with your DoNothing rule, so that you will be able to select it from inside the conditional control.

URL]


c) Make sure you have your rule hooked up to something. You'll need to associate the execution of your rule with some event in the dialog. In my test case, I hooked it to the control for the expression "a", like this:

URL]


[With the control for "a" selected, choose the Visual Rules tab, tell NX to run a visual rule when the value of "a" changes, and tell it which rule to run.]

Does that all make sense? With all of those pieces in place, it should run just like in the attached video.

Visual Rules Example Video for PrintScaffold

Didn't know what version you were using, so I went back to NX 8.5 -- the oldest version I still have installed. But here's the little Product Template assembly files.

Visual Rules Example Assembly for PrintScaffold

Does that help?


Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
 
Hi Taylor!

I was able to figure out this myself eventually, for I am not the biggest PBCAK in the world. :)

What I could NOT figure out no matter how hard I tried is how to remove few different components at once. For example let's assume I have Part 1, Part 2 and Part 3, and also a variable. If it is equals 3, all components are in place. If it equals 2, I remove Part 3. If it equals 1, I remove Part 3 and Part 2. That did not work. Maybe I used the wrong approach. Could you please help with this one?

 
PrintScaffold --

>>I am not the biggest PBCAK in the world.

Oh, that's true for sure. Just messing with you. :)

Here's the trick... You can send an output to more than one block at a time. For instance, one solution would be to modify your conditional rule to look something like this:

URL]


...and just reuse the value of "a" twice in your two different conditional statements.

That would produce a result like this:

Visual Rules Example Video 2 for PrintScaffold

Alternately, another way to remove multiple components all at the same time would be to make your "Remove" rule look like this:

URL]


That's totally fair game as well. :)

Does that make sense?



Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
 
Hi Taylor,

Your explanation are very clear then I was able to create my first visual rule to delete component.

1°) My problem is that I have 4 identical sub assembly (sous_ens_roue_ar) and I want to delete only 2 of them

sub_assembly_to_delete_u2msvc.jpg


2°) Then I also want to be able to add them with original assembly constraint

Is it possible without using suppress component ?

Thanks in advance



Regards
Didier Psaltopoulos
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor