Remove component in PTS on condition
Remove component in PTS on condition
(OP)
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?
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?





RE: Remove component in PTS on condition
Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
RE: Remove component in PTS on condition
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.
www.cadroad.com
RE: Remove component in PTS on condition
www.cadroad.com
RE: Remove component in PTS on condition
>> why they do not work at all? :)
Well, if you're going to go there...
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:
...and then your conditional will look like this in the end:
b) Your "Remove" rule looks great.
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:
[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)
RE: Remove component in PTS on condition
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?
www.cadroad.com
RE: Remove component in PTS on condition
>>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:
...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:
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)
RE: Remove component in PTS on condition
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
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
http://www.psi-cad.fr