Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

pro program how to turn a local group off?

Status
Not open for further replies.

Skiddy

Industrial
Jan 18, 2003
16
Hi,

i have created a local group in a prt file consisting of three protrusions. i want to be able to turn it on and off as desired using pro program. I have gone back to basics with these 3 protrusions but i still maintain to get errors!

below is a copy of the statements in pro program including where the errors highlight.

Please can you tell me where im going wrong?

(local group=shapes)

many thanks,



VERSION
REVNUM 164
LISTING FOR PART TEST

INPUT

include_prot yes_no
"protrusion yes no?"
END INPUT

RELATIONS
END RELATIONS


ADD FEATURE (initial number 1)
INTERNAL FEATURE ID 1
TYPE = DATUM PLANE
NAME = RIGHT


FEATURE IS IN LAYER(S) :
01___PRT_ALL_DTM_PLN - OPERATION = SHOWN
01___PRT_DEF_DTM_PLN - OPERATION = SHOWN

END ADD


ADD FEATURE (initial number 2)
INTERNAL FEATURE ID 3
TYPE = DATUM PLANE
NAME = TOP


FEATURE IS IN LAYER(S) :
01___PRT_ALL_DTM_PLN - OPERATION = SHOWN
01___PRT_DEF_DTM_PLN - OPERATION = SHOWN

END ADD


ADD FEATURE (initial number 3)
INTERNAL FEATURE ID 5
TYPE = DATUM PLANE
NAME = FRONT


FEATURE IS IN LAYER(S) :
01___PRT_ALL_DTM_PLN - OPERATION = SHOWN
01___PRT_DEF_DTM_PLN - OPERATION = SHOWN

END ADD


ADD FEATURE (initial number 4)
INTERNAL FEATURE ID 7
TYPE = COORDINATE SYSTEM
NAME = PRT_CSYS_DEF


FEATURE IS IN LAYER(S) :
05___PRT_ALL_DTM_CSYS - OPERATION = SHOWN
05___PRT_DEF_DTM_CSYS - OPERATION = SHOWN

END ADD


if include_prot==yes
add part prot



ADD FEATURE (initial number 5)
!*** ERR: no END ADD statement for ADD on line 0
INTERNAL FEATURE ID 99


GROUP HEAD

NO. ELEMENT NAME INFO
--- ------------- -------------
1 Name Defined
2 Features Defined
3 Construction Defined

NAME = SHAPES
FEATURE BELONGS TO LOCAL GROUP SHAPES



MEMBER OF A GROUP, NAME = SHAPES
LEADING FEATURE OF THE GROUP: ID = 99
LAST FEATURE OF THE GROUP: ID = 79
END ADD
!*** ERR: unmatched END statement encountered


ADD FEATURE (initial number 6)
INTERNAL FEATURE ID 39
PARENTS = 3(#2) 5(#3) 1(#1)

PROTRUSION: Extrude

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Attributes One Side Defined
2 Section Sk. plane - Surface RIGHT of feat #1 (DATUM PLANE) Defined
3 Direction Defined
4 Depth Blind, depth = 126.501 Defined

FEATURE BELONGS TO LOCAL GROUP SHAPES
SECTION NAME = S2D0001


FEATURE'S DIMENSIONS:
d1 = 177.36 (weak)
d2 = 15.68 (weak)
d3 = 77.20 (weak)
d4 = 126.50

MEMBER OF A GROUP, NAME = SHAPES
LEADING FEATURE OF THE GROUP: ID = 99
LAST FEATURE OF THE GROUP: ID = 79
END ADD


ADD FEATURE (initial number 7)
INTERNAL FEATURE ID 57
PARENTS = 3(#2) 5(#3) 1(#1)

PROTRUSION: Extrude

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Attributes One Side Defined
2 Section Defined
3 Direction Defined
4 Depth Blind, depth = 108.892 Defined

FEATURE BELONGS TO LOCAL GROUP SHAPES
SECTION NAME = S2D0002

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

FEATURE'S DIMENSIONS:
d5 = 30.00
d6 = 93.26 Dia (weak)
d7 = 72.64 (weak)
d8 = 123.26 (weak)
d9 = 108.89

MEMBER OF A GROUP, NAME = SHAPES
LEADING FEATURE OF THE GROUP: ID = 99
LAST FEATURE OF THE GROUP: ID = 79
END ADD


ADD FEATURE (initial number 8)
INTERNAL FEATURE ID 79
PARENTS = 3(#2) 5(#3) 1(#1)

PROTRUSION: Extrude

NO. ELEMENT NAME INFO STATUS
--- ------------ ----------- ------
1 Attributes One Side Defined
2 Section Defined
3 Direction Defined
4 Depth Blind, depth = 125.487 Defined

FEATURE BELONGS TO LOCAL GROUP SHAPES
SECTION NAME = S2D0003


FEATURE'S DIMENSIONS:
d10 = 60.00
d12 = 189.15 (weak)
d13 = 18.94 (weak)
d14 = 112.59 (weak)
d15 = 125.49

MEMBER OF A GROUP, NAME = SHAPES
LEADING FEATURE OF THE GROUP: ID = 99
LAST FEATURE OF THE GROUP: ID = 79
END ADD

endif


MASSPROP
END MASSPROP

 
Replies continue below

Recommended for you

Hi Skiddy,

Take a look here (sequence from your PRO/PROGRAM):
.
.
.

if include_prot==yes
add part prot



ADD FEATURE (initial number 5)
!*** ERR: no END ADD statement for ADD on line 0
INTERNAL FEATURE ID 99

.
.
.

Please add ENDIF statement like this (remember every IF must end with an ENDIF statement):

if include_prot==yes
add part prot
ENDIF

That was your error!

Good luck.
-Hora
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor