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.
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
thread554-48981 and thread554-24772.
-Hora
RE: suppressing and resuming groups using pro program
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
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
RE: suppressing and resuming groups using pro program
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
Can you do it?
-Hora
RE: suppressing and resuming groups using pro program
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
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
RE: suppressing and resuming groups using pro program
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
RE: suppressing and resuming groups using pro program
RE: suppressing and resuming groups using pro program
-Hora
RE: suppressing and resuming groups using pro program
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
-Hora
RE: suppressing and resuming groups using pro program
RE: suppressing and resuming groups using pro program
thanks again
RE: suppressing and resuming groups using pro program
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
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
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
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
I will give it a try. We'll talk Monday. Have a nice weekend.
-Hora
RE: suppressing and resuming groups using pro program
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
Thanks,
Dustin
RE: suppressing and resuming groups using pro program
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
Thanks Again,
Dustin
RE: suppressing and resuming groups using pro program
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
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
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
Good luck, Dustin
-Hora