Pro/PROGRAM question about suppressing groups & rearranging the model tree.
Sep 23, 2011
09:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Sep 23, 2011
09:27 AM
Pro/PROGRAM question about suppressing groups & rearranging the model tree.
WF3.
I have configurable models set up, using Pro/PROGRAM. I have yes/no
parameters, that use IF statements in the Pro/PROGRAM to suppress groups
that are not needed in the configuration. When these were originally set
up, I put the IF statement before the group header, and the ENDIF statement
after the last item in the group. Like so:
Here's the model tree:
And here's the Pro/PROGRAM section:
IF REAR_STABILIZERS
ADD FEATURE 106
INTERNAL FEATURE ID 405
GROUP HEAD
NO. ELEMENT NAME INFO
--- ------------- -------------
1 Name Defined
2 Features Defined
3 Construction Defined
NAME = REAR_STABILIZERS
FEATURE BELONGS TO LOCAL GROUP REAR_STABILIZERS
MEMBER OF A GROUP, NAME = REAR_STABILIZERS
LEADING FEATURE OF THE GROUP: ID = 405
LAST FEATURE OF THE GROUP: ID = 403
END ADD
ADD SUBASSEMBLY 52383
INTERNAL COMPONENT ID 402
PARENTS = 12(#5)
END ADD
ADD SUBASSEMBLY 52383
INTERNAL COMPONENT ID 403
PARENTS = 12(#5)
END ADD
END IF
ADD PART HCS05-02
INTERNAL COMPONENT ID 2086
PARENTS = 402(#107)
END ADD
However, when I tried to drag the hardware into the group, like so:
The program now looks like this:
IF REAR_STABILIZERS
ADD FEATURE 106
INTERNAL FEATURE ID 405
GROUP HEAD
NO. ELEMENT NAME INFO
--- ------------- -------------
1 Name Defined
2 Features Defined
3 Construction Defined
NAME = REAR_STABILIZERS
FEATURE BELONGS TO LOCAL GROUP REAR_STABILIZERS
MEMBER OF A GROUP, NAME = REAR_STABILIZERS
LEADING FEATURE OF THE GROUP: ID = 405
LAST FEATURE OF THE GROUP: ID = 2429
END ADD
ADD SUBASSEMBLY 52383
INTERNAL COMPONENT ID 402
PARENTS = 12(#5)
END ADD
ADD SUBASSEMBLY 52383
INTERNAL COMPONENT ID 403
PARENTS = 12(#5)
END ADD
END IF
ADD PART HCS05-02
INTERNAL COMPONENT ID 2086
PARENTS = 402(#107)
END ADD
<other items=" snipped=" out=">
ADD PART NLN05
INTERNAL COMPONENT ID 2429
PARENTS = 2086(#109) 12(#5)
END ADD
So the last item in the group is after the ENDIF statement. This causes
failure on regen. Is there a way to set up the Pro/PROGRAM so that the user
can drag items into the group in the model, and have it work properly,
without having to mess with the program every time we add stuff to the
group?
I did try moving the END IF statement to various places in the program
(right after the header, right after the first item) and they did not work.
Any input is appreciated.
Thank you.
--
Lyle Beidler
MGS Inc
178 Muddy Creek Church Rd
Denver PA 17517
717-336-7528
Fax 717-336-0514
<">mailto:-> -
<">http://www.mgsincorporated.com>
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
I have configurable models set up, using Pro/PROGRAM. I have yes/no
parameters, that use IF statements in the Pro/PROGRAM to suppress groups
that are not needed in the configuration. When these were originally set
up, I put the IF statement before the group header, and the ENDIF statement
after the last item in the group. Like so:
Here's the model tree:
And here's the Pro/PROGRAM section:
IF REAR_STABILIZERS
ADD FEATURE 106
INTERNAL FEATURE ID 405
GROUP HEAD
NO. ELEMENT NAME INFO
--- ------------- -------------
1 Name Defined
2 Features Defined
3 Construction Defined
NAME = REAR_STABILIZERS
FEATURE BELONGS TO LOCAL GROUP REAR_STABILIZERS
MEMBER OF A GROUP, NAME = REAR_STABILIZERS
LEADING FEATURE OF THE GROUP: ID = 405
LAST FEATURE OF THE GROUP: ID = 403
END ADD
ADD SUBASSEMBLY 52383
INTERNAL COMPONENT ID 402
PARENTS = 12(#5)
END ADD
ADD SUBASSEMBLY 52383
INTERNAL COMPONENT ID 403
PARENTS = 12(#5)
END ADD
END IF
ADD PART HCS05-02
INTERNAL COMPONENT ID 2086
PARENTS = 402(#107)
END ADD
However, when I tried to drag the hardware into the group, like so:
The program now looks like this:
IF REAR_STABILIZERS
ADD FEATURE 106
INTERNAL FEATURE ID 405
GROUP HEAD
NO. ELEMENT NAME INFO
--- ------------- -------------
1 Name Defined
2 Features Defined
3 Construction Defined
NAME = REAR_STABILIZERS
FEATURE BELONGS TO LOCAL GROUP REAR_STABILIZERS
MEMBER OF A GROUP, NAME = REAR_STABILIZERS
LEADING FEATURE OF THE GROUP: ID = 405
LAST FEATURE OF THE GROUP: ID = 2429
END ADD
ADD SUBASSEMBLY 52383
INTERNAL COMPONENT ID 402
PARENTS = 12(#5)
END ADD
ADD SUBASSEMBLY 52383
INTERNAL COMPONENT ID 403
PARENTS = 12(#5)
END ADD
END IF
ADD PART HCS05-02
INTERNAL COMPONENT ID 2086
PARENTS = 402(#107)
END ADD
<other items=" snipped=" out=">
ADD PART NLN05
INTERNAL COMPONENT ID 2429
PARENTS = 2086(#109) 12(#5)
END ADD
So the last item in the group is after the ENDIF statement. This causes
failure on regen. Is there a way to set up the Pro/PROGRAM so that the user
can drag items into the group in the model, and have it work properly,
without having to mess with the program every time we add stuff to the
group?
I did try moving the END IF statement to various places in the program
(right after the header, right after the first item) and they did not work.
Any input is appreciated.
Thank you.
--
Lyle Beidler
MGS Inc
178 Muddy Creek Church Rd
Denver PA 17517
717-336-7528
Fax 717-336-0514
<">mailto:-> -
<">http://www.mgsincorporated.com>
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Labels:
- Labels:
-
General
1 REPLY 1
Sep 23, 2011
03:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Sep 23, 2011
03:52 PM
Because editing the Pro/PROGRAM is a manual process, Pro/E makes no assumptions about what you intended when you reorder items in the model tree.
Even if you had moved the hardware between the two subassemblies (if that were possible), it would have split the programming so that only the assemblies are controlled by the program.
I don't know of any way to make Pro/PROGRAM perform the way you are suggesting.
I would be very interested to know if you learn of a way to do this.
Even if you had moved the hardware between the two subassemblies (if that were possible), it would have split the programming so that only the assemblies are controlled by the program.
I don't know of any way to make Pro/PROGRAM perform the way you are suggesting.
I would be very interested to know if you learn of a way to do this.
