×
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

suppressing and resuming groups using pro program

suppressing and resuming groups using pro program

suppressing and resuming groups using pro program

(OP)
can anyone help with my problem please!

Facts:
-Both groups are suppressed to start with:
-Both groups can not be resumed at the same time.

Goal:
When conditional statement 1 (IF HEAP_PROJ_DISTANCE_1:FID_HEAP_AXIS_DISTANCE_1 > ACTIVATION_DISTANCE) is true, I need for group 1 to be resumed and group 2 to be suppressed.

If conditional statement 1 is not met I need both to stay suppressed and then a second conditional statement (IF HEAP_PROJ_DISTANCE_1:FID_HEAP_AXIS_DISTANCE_1< ACTIVATION_DISTANCE) to be performed and If conditional statement 2 is true, I need for group 2 to be resumed and group 1 to be suppressed.


Problem:

I can’t get the order and syntax of the pro program file correct so that it is executed properly

Also I know that even if I can get this to work I will still have another issue.

Issue:  

If group 1 is suppressed and group 2 is resumed and I make a change to a dim which changes the situation from group 1 suppressed and group 2 resumed to group 2 suppressed and group 1 resumed it will cause a problem because group 2 is resumed and when group 1 is resumed I have a failure due to the geometry and features both groups can not be resumed at the same time.

below is the program file with the first conditional statment in it the group1 id is 1386 and the second is 1506.  Can anyone help with this problem/ by the way i'm a first time user of this site and pro program.

RE: suppressing and resuming groups using pro program

(OP)
Hora,
Thanks for the info, but after reading these two threads i'm not sure that i fully understand what I need to do still. Is it possible for you to help in more detail? if so i can post what i have so far and maybe you can tell me where i'm going wrong.  Thanks in advance for your help.

RE: suppressing and resuming groups using pro program

OK, I will try to help you.

Add the following relations:

if HEAP_PROJ_DISTANCE_1:FID_HEAP_AXIS_DISTANCE_1 > ACTIVATION_DISTANCE
   dummy = 1
else
   dummy = 0
endif

Now, in Pro/Program identify the group of the features you want to activate or supress and add this statement:

IF DUMMY == 1
..
..
..   
..
ENDIF

That's all.

Practice with this simple example: Create a cylinder and add a hole onto it. Then add the parameter dummy equals with 1 (dummy = 1).

Edit the Pro/Program and identify the hole. You should see something like this:


     ADD FEATURE
     INTERNAL FEATURE ID  60
     PARENTS = 1(#1) 5(#3) 39(#5)

 CUT: Extrude
 
 NO. ELEMENT NAME    INFO                                            STATUS
 --- ------------ -----------                                        ------
  1  Attributes   One Side                                           Defined   
  2  Section      Sk. plane - Surface of feat #5 (PROTRUSION)        Defined   
  3  MaterialSide Inside section                                     Defined   
  4  Direction                                                       Defined   
  5  Depth        Through Next                                       Defined   

     SECTION NAME = S2D0002

    FEATURE IS IN LAYER(S) :
      02___PRT_ALL_AXES - OPERATION = SHOWN
      AXES - OPERATION = SHOWN

     FEATURE'S DIMENSIONS:
     d4 = 36.982 Dia
     d5 = 75.227
     END ADD


MASSPROP
END MASSPROP

Now add the IF and ENDIF statements. You will have this:

 IF DUMMY == 1

     ADD FEATURE
     INTERNAL FEATURE ID  60
     PARENTS = 1(#1) 5(#3) 39(#5)

 CUT: Extrude
 
 NO. ELEMENT NAME    INFO                                            STATUS
 --- ------------ -----------                                        ------
  1  Attributes   One Side                                           Defined   
  2  Section      Sk. plane - Surface of feat #5 (PROTRUSION)        Defined   
  3  MaterialSide Inside section                                     Defined   
  4  Direction                                                       Defined   
  5  Depth        Through Next                                       Defined   

     SECTION NAME = S2D0002

    FEATURE IS IN LAYER(S) :
      02___PRT_ALL_AXES - OPERATION = SHOWN
      AXES - OPERATION = SHOWN

     FEATURE'S DIMENSIONS:
     d4 = 36.982 Dia
     d5 = 75.227
     END ADD
 END IF

MASSPROP
END MASSPROP

Exit Pro/Program and incorporate changes into the part. Now change the dummy variable to 0. Your feature will dissapear after regeneration.

Let me know if it works.

-Hora




RE: suppressing and resuming groups using pro program

(OP)
ok i'll try this and get back to you and let you know if it works or not for me. thanks

RE: suppressing and resuming groups using pro program

(OP)
Hora,
i tried this but it does not do exactly what i need it to. let me give you the senerio using your suggestion that i think has to happen and maybe you can tell me if it is possible. what i need to happen (this is a .prt file):

If dummy = 1, then group1 and 2 need to be suppressed, then group 1 needs to be resumed.

(again it needs to cut both off first because both can not exist at the same time if a previous condition existed where group 1 was suppressed and group 2 was resumed)

if dummy = 0 then suppress group 1 and resume group2

RE: suppressing and resuming groups using pro program

Why not give 3 values to dummy? 0 for both supressed, 1 for both resumed and 2 for only one supressed?

Can you do it?

-Hora

RE: suppressing and resuming groups using pro program

(OP)
again i'm new at pro program so i'm not sure how the third variable would be incorporated in the relation file can you help? also how do you tell pro program to suppress all the members of the group 1 and 2 and then tell it how to resume all the members of group 1 later in the file. example below just using 1 feature:

IF DUMMY ==1
ADD SUPPRESSED FEATURE
     INTERNAL FEATURE ID  833
     PARENTS = 570(*) 730(*)

then would you copy the above text and do this?

IF DUMMY ==1
ADD SUPPRESSED FEATURE
     INTERNAL FEATURE ID  833
     PARENTS = 570(*) 730(*)

because when i try this is gives me an error saying

!*** ERR: no END ADD statement for ADD on line 0
!*** ERR: file contains more IF's than ENDIF's

AND I HAVE AN END IF AT THE END OF THE FILE JUST BEFORE THE MASS PROP
END MASSPROP
 

RE: suppressing and resuming groups using pro program

First rule: Each IF must have an ENDIF.

So you must have this:

IF DUMMY ==1
ADD SUPPRESSED FEATURE
     INTERNAL FEATURE ID  833
     PARENTS = 570(*) 730(*)
ENDIF

About MASSPROP:

This is the last thing you will see in your Pro/Program file. The END before MASSPROP must lay there. In fact you can instruct Pro calculating the mass of the part each time you regen the part by doing this in the MASSPROP section:

MASSPROP
part xxxx.prt (your part name here)
END MASSPROP

Now, back to our business:

You can copy and paste features inside Pro/Program. Each feature must have an unique ID.

I will verify if you can suppress a single member of a group but I'm pretty sure you can't. So I think you must ungroup the features (if possible).

-Hora

RE: suppressing and resuming groups using pro program

(OP)
ok please let me know if that is possible! i will also try this to see what i get. thanks

RE: suppressing and resuming groups using pro program

Ok, here we go:

Only one feature of a group of features cannot be supressed without supressing the whole group.

The good news for you is that you don't need this: I looked at your first statement and you have asked to supress two groups, or only one. Not individual features of any group.

So you need this variable "dummy" having 3 values: 0, 1 and 2

0 - will supress both groups
1 - will resume both groups
2 - only one group will be supressed (last one in my example)
if you nedd to supress the second grou, another value (3) will be needed for your "dummy" variable.

In ProProgram you must have something like this:

IF (DUMMY == 1 || DUMMY == 2)
...
...   (SET OF FEATURES BELONGING TO GROUP 1 HERE)
...
ENDIF

IF (DUMMY == 1)
...
...   (SET OF FEATURES BELONGING TO GROUP 2 HERE)
...
ENDIF

As you can see, if "dummy" will be 2, only the first group will be shown and the second one will be supressed. If "dummy" will be 0, then both will be supressed.

The "||" means "or" and it came from C language.

IMPORTANT: When you will edit the ProProgram assure all groups are NOT SUPRESSED. It's easy.

Give it a try!

-Hora

RE: suppressing and resuming groups using pro program

(OP)
ok i think we are getting closer but, i need to clarify a few things. i have created a conditional flow chart to help put things in better perspective. but it will not format correctly in the reply to this thread comment box...

RE: suppressing and resuming groups using pro program

(OP)
Hora, thanks for the response I appreciate all your help so far.  I definitely want to do it on my own so I learn the most that I can I just wanted to send you everything I had so you could get a clear picture of where I am trying to go with this thing.  

RE: suppressing and resuming groups using pro program

smile Let me know it worked for you.

-Hora

RE: suppressing and resuming groups using pro program

(OP)
Hora, i performed the exercise you sent and tried all types of variations and it works fine but if you have an example like mine it does not work like this. I created a very simple version of what i have, using your prt0001.prt model that you sent. I will send it to the same place i sent the info from yesterday but aside from this we will keep contact through this site.  the example i'm sending has the conditional statments removed from the pro program file. You will notice that you can resume group 1 or group 2 on there own but not together. if you don't mind see if you can get this example to work and if so i think we can solve the other problem. thanks.  lets say for the example:
if dummy == 1 supress both groups then resume group 1
if dummy == 2 supress group1 and resume group 2
if dummy == 0 supress both groups.

Thanks

RE: suppressing and resuming groups using pro program

OK I will take a look. Don't forget, you can't supress (both groups) and resume (one group) at the same time!

-Hora

RE: suppressing and resuming groups using pro program

(OP)
ok, i'll let you know if i find any thing from my side.

RE: suppressing and resuming groups using pro program

(OP)
i will try our latest suggestion but meanwhile i sent the backwards compatible file and a word doc on how to do this (real easy) to the same place i sent the other files. i'll let you know how the latest thing works out, let me know if you have any sucess at working with the latest file i sent you.

thanks again

RE: suppressing and resuming groups using pro program

(OP)
Hora,
i tried your new example and it works with your example but i think because my situation is still different enough that it doesn't work in my case.  Please let me know if you where able to open the last file i sent? if not i can probably explain how to modify your example to make it like the latest file i sent.

RE: suppressing and resuming groups using pro program

If the file was created in Wildfire, I cannot open it. I don't have Wildfire. We are still on 2001.

Probably your features of the groups are not groupped together or there are links between features.

Try first to suppress only one group.

-Hora

RE: suppressing and resuming groups using pro program

I saw you sent me a .neu file (neutral). This is just a dumb solid, without parametric features.

You must apply the same techique of my example to your part. Let all features to be active before use the IF END-IF condition.

The hard thing is to identify all the features of a group. And if they are not groupped in your tree, then you must split the IF-END IF condition for each one. It is not complicated, but attention.

Go ahead, you will do it. Pro/Program is not complicated!
-Hora

RE: suppressing and resuming groups using pro program

(OP)
no I dont think that is it either, if you have time here is how you can alter the file you sent me (takes only a few minutes, very quick)and then you know exactly what i have.

1. first delete the conditional files in pro program and delete the last cut.

2. change the first protrusion to a surface with capped ends but retain the same dims to locate the circle and its size.

3. change the first feature (round cut) to a surface as well, but change it from a cut to a protrusion (no capped ends), so you will have a    cylinder within a cylinder.

4. then merge the two cylinders so the final result looks like a big circle with a little circle removed.

5. group the merge and the feature before it and this is group 1

6. supress group 1

7. create a new surface protrusion (square)(extending out from the large circle so it looks like a flag pole sticking out of the ground) with capped ends. the sketch for the new square should be On the large circle, and make the square  15 x 15 in size on the right side of the right datam plane and below the front datum plane on the right side. place a dimension from the right datum plane to the left side of the box with a dim of 68, then place a dim from the front datum plane to the bottom of the box enter 8 as the dim. all of this, places a box in the center of hole created in step 2, and the box should be smaller than the hole (you should not be able to see the hole because the previous group and its features should be suppressed.)

8. merge the new box and large cylinder together so they become one quilt and group these two features together to make group 2.

9. now you have created a problem similar to what i have, because either of the group features can be resumed by themselves but not together.

With this, can you see if you can find a way to suppress and resume them back and forth without causing failures.

RE: suppressing and resuming groups using pro program

Dustin,

I will give it a try. We'll talk Monday. Have a nice weekend.

-Hora

RE: suppressing and resuming groups using pro program

(OP)
Hora,
ok you to, again i appreciate all your help, if you give it a try and you can't figure it out then I'll just give up on making this work, i would just like to know if it is possible and how to do it if it is. Thanks again.

Dustin

RE: suppressing and resuming groups using pro program

(OP)
Hora, hope you had a good weekend, please let me know if you get anywhere with the last example? also do you know if there is a way to regenerate using pro program so you don't have to do it manually?  

Thanks,
Dustin

RE: suppressing and resuming groups using pro program

Dustin, I do not nave time today to create your situation. Too busy at work. I read quickly your instrunctions to create your part and I'm confused. You use the first feature (the main surface) in both groups? I think your problem is you link features that will not be supressed together.

Do not create links between the feature which are not in the same group, otherwise your supress will not work.

I'm pretty sure this is your problem.

-Hora

RE: suppressing and resuming groups using pro program

(OP)
ok, i try a different approach creating a second main feature and merging the first main feature with the first group and the second main feature with the second group, i'll let you know how it works out, if your to busy to respond today thats ok, mayby tomorrow.

Thanks Again,
Dustin

RE: suppressing and resuming groups using pro program

(OP)
Hora, you were right about the features being linked as the problem, i tried the new technique i described in the last post and it worked on the test part example however i fixed this in my original model and it still has a problem. i will investigate some more and get back to you with the results.

Meanwhile, can you tell me if it is possible to create a syntax in pro program that will regenerate automatically.
Also, beside the above question is it possible to copy and reference features in pro program, example below:

if you have a feature say a revolve:

ADD SUPPRESSED FEATURE
     INTERNAL FEATURE ID  570
     PARENTS = 410(#12) 1305(#17)

and you have a conditional statment that removes the SUPPRESSED:

ADD FEATURE
     INTERNAL FEATURE ID  570
     PARENTS = 410(#12) 1305(#17)

is there any way to reference this feature later in the pro program file to perform another operation to it, for instance maybe to hide the part or maybe something else. and if this is possible what would the syntax be.


Thanks,
Dustin




RE: suppressing and resuming groups using pro program

Hello Dustin,

I'm glad to see you solved the problem. Regarding the second question, unfortunately, ProProgram is not so powerfull to do things like that. Only a C program and Pro/Toolkit API functions will allow you to control features and show them active or inactive function if diffrerent inputs.

-Hora

RE: suppressing and resuming groups using pro program

(OP)
HORA,
THANKS FOR ALL YOUR HELP WITH EVERYTHING, I STILL HAVE A FEW ISSUES BUT I THINK I CAN MANAGE FROM HERE, I THINK I WILL BE FINE, BUT JUST IN CASE I RUN INTO SOMETHING I'LL RESPOND BACK TO THIS POST.  THANKS A BUNCH FOR ALL OF YOUR HELP!

THANKS,
DUSTIN

RE: suppressing and resuming groups using pro program

smile

Good luck, Dustin

-Hora

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