×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Remove component in PTS on condition

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?

www.cadroad.com

RE: Remove component in PTS on condition

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)

RE: Remove component in PTS on condition

(OP)
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.




www.cadroad.com

RE: Remove component in PTS on condition

(OP)
Anybody there? I have some interesting question regarding PTS visual rules. One of them - why they do not work at all? :)

www.cadroad.com

RE: Remove component in PTS on condition

My apologies, PrintScaffold... On the road a lot lately.

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

Well, if you're going to go there... winky smile When they don't work, it's almost always a PBCAK error. big smile

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. smile 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.



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

(OP)
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?

www.cadroad.com

RE: Remove component in PTS on condition

PrintScaffold --

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

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

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. smile

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

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



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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources