×
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

pro program how to turn a local group off?

pro program how to turn a local group off?

pro program how to turn a local group off?

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

RE: pro program how to turn a local group off?

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

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