Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Suppress/ Unsuppress an entire (variable-sized) pattern with Pro/Program

Status
Not open for further replies.

loki3000

Mechanical
Sep 29, 2009
652
Hello.

i have a pattern of simple holes that are defined as a dimension pattern, where the number of instances is defined by a Parameter.
on top of that holes (after them in the tree) i have a reference-based pattern of cosmetic threads (nr. of instances is the same as nr. of holes).

i would like to suppress/ unsuppress the entire cosm. thread pattern based on a condition (parameter) based on the pro-program (or something else, like relations, if that's available).

i've tried adding "SUPPRESSED" to the add feature <pattern>, but that only suppressed the top pattern (all the threads still remained unsuppressed after rebuild).
i've also tried to add "SUPPRESSED" to the first instance of the cosmetic thread definition, but that only produced a long error screen that the parent feat is suppressed).

any ideas how could i do that? the problem is that # of instances is often changed, so i can't simple add an if to every instance of it.

here is the definition of the pattern and first thread

ADD FEATURE (initial number 88)
INTERNAL FEATURE ID 27018
PARENTS = 13890(#55)

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Type Reference Defined

LEADER OF A (32 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d322 = 20 General_Dims
d323 = 13.5 General_DimsM
END ADD


ADD FEATURE (initial number 89)
INTERNAL FEATURE ID 26335
PARENTS = 200(#8) 13796(#56)

COSMETIC: Thread

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Thread Surf Defined
2 Start Surf Defined
3 Direction Defined
4 Depth Blind, depth = 20 Defined
5 Major Diam Value = 13.5000 Defined
6 Note Params Defined

MEMBER (1, 1) IN A (32 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d322 = 20 General_Dims
d323 = 13.5 General_DimsM
END ADD

etc.....



I would like to suppress or unsuppress an entire pattern only, not only specific instances.
if it's suppressed i would like it in the tree anyway (so that it doesn't dissappear).
any ideas?
 
Replies continue below

Recommended for you

If your parameter is a yes/no type called THREAD then you can use an if statement in PRO/Program like below, and it will suppress anything inside the IF statement unless THREAD=YES/TRUE

IF THREAD
ADD FEATURE (initial number 88)
INTERNAL FEATURE ID 27018
PARENTS = 13890(#55)

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Type Reference Defined

LEADER OF A (32 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d322 = 20 General_Dims
d323 = 13.5 General_DimsM
END ADD


ADD FEATURE (initial number 89)
INTERNAL FEATURE ID 26335
PARENTS = 200(#8) 13796(#56)

COSMETIC: Thread

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Thread Surf Defined
2 Start Surf Defined
3 Direction Defined
4 Depth Blind, depth = 20 Defined
5 Major Diam Value = 13.5000 Defined
6 Note Params Defined

MEMBER (1, 1) IN A (32 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d322 = 20 General_Dims
d323 = 13.5 General_DimsM
END ADD
END IF
 
IF T1 > 0
!*** ERR: line contains a bad symbol or is otherwise invalid
ADD FEATURE (initial number 88)
INTERNAL FEATURE ID 27018
PARENTS = 13890(#55)

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Type Reference Defined

LEADER OF A (32 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d322 = 20 General_Dims
d323 = 13.5 General_DimsM
END ADD


ADD FEATURE (initial number 89)
INTERNAL FEATURE ID 26335
PARENTS = 200(#8) 13796(#56)

COSMETIC: Thread

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Thread Surf Defined
2 Start Surf Defined
3 Direction Defined
4 Depth Blind, depth = 20 Defined
5 Major Diam Value = 13.5000 Defined
6 Note Params Defined

MEMBER (1, 1) IN A (32 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d322 = 20 General_Dims
d323 = 13.5 General_DimsM
END ADD
ENDIF

ADD FEATURE (initial number 90)
INTERNAL FEATURE ID 27019
PARENTS = 200(#8) 13796(#56) 26335(#89)

COSMETIC: Thread

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Thread Surf Defined
2 Start Surf Defined
3 Direction Defined
4 Depth Blind, depth = 20 Defined
5 Major Diam Value = 13.5000 Defined
6 Note Params Defined

MEMBER (2, 1) IN A (32 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d322 = 20 General_Dims
d323 = 13.5 General_DimsM
END ADD

.....

ADD FEATURE (initial number 120)
INTERNAL FEATURE ID 27049
PARENTS = 200(#8) 13796(#56) 26335(#89)

COSMETIC: Thread

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Thread Surf Defined
2 Start Surf Defined
3 Direction Defined
4 Depth Blind, depth = 20 Defined
5 Major Diam Value = 13.5000 Defined
6 Note Params Defined

MEMBER (32, 1) IN A (32 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d322 = 20 General_Dims
d323 = 13.5 General_DimsM
END ADD

(------------end of pattern here-------)

ADD SUPPRESSED FEATURE
INTERNAL FEATURE ID 23040
PARENTS = 13890(#55)

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Type Reference Defined

LEADER OF A (32 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d279 = 1 General_Dims
END ADD

...

i have the thread length defined with a parameter T1 (actual length). if it's 0, then i would like the pattern suppressed.
i tried to put the end if behind the last item in the pattern, but the end result was the same.

thanks for the assistance in any case. :)
 
EDIT: i got it to work with thread = true
but i would also like to unsuppress it if necessary. any option for that?

i would like to change only ADD FEATURE to ADD SUPPRESSED FEATURE
and if the user wants, he can unsuppress it via the GUI (right now with the above option there is only the option to delete pattern).
if he unsuppresses it, it would return to default values, written above.

i've tried
if thread
add suppressed feature
else
add feature
end if
but it doesn't work.

any ideas?

EDIT 2:

i am trying to accomplish this (only single inst. in pattern here):

IF thread

ADD SUPPRESSED FEATURE (initial number 50)
INTERNAL FEATURE ID 27018
PARENTS = 13890(#48)

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Type Reference Defined

LEADER OF A (1 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d322 = 20 General_Dims
d323 = 13.5 General_DimsM
END ADD


ADD SUPPRESSED FEATURE (initial number 51)
INTERNAL FEATURE ID 26335
PARENTS = 200(#8) 13796(#49)

COSMETIC: Thread

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Thread Surf Defined
2 Start Surf Defined
3 Direction Defined
4 Depth Blind, depth = 20 Defined
5 Major Diam Value = 13.5000 Defined
6 Note Params Defined

MEMBER (1, 1) IN A (1 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d322 = 20 General_Dims
d323 = 13.5 General_DimsM
END ADD

ELSE

ADD FEATURE (initial number 50)
INTERNAL FEATURE ID 27018
PARENTS = 13890(#48)

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Type Reference Defined

LEADER OF A (1 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d322 = 20 General_Dims
d323 = 13.5 General_DimsM
END ADD
!*** ERR: pattern member should have same condition as leader 27018


ADD FEATURE (initial number 51)
INTERNAL FEATURE ID 26335
PARENTS = 200(#8) 13796(#49)

COSMETIC: Thread

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Thread Surf Defined
2 Start Surf Defined
3 Direction Defined
4 Depth Blind, depth = 20 Defined
5 Major Diam Value = 13.5000 Defined
6 Note Params Defined

MEMBER (1, 1) IN A (1 X 1) REF GENERAL PATTERN


MAIN PATTERN DIMENSIONS:
d322 = 20 General_Dims
d323 = 13.5 General_DimsM
END ADD

END IF

but it won't let me have 2 features iwth the same ID
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor