Skip to main content
12-Amethyst
October 31, 2016
Question

How to force all parts in an assembly to regenerate?

  • October 31, 2016
  • 4 replies
  • 7237 views

I have an analysis feature in each part in an assembly that reads cost from an excel spreadsheet and stores it in a parameter. It works fine, as long as the part regenerates. The problem is, how can I force all parts to regenerate when I regen the assembly, after updating the spreadsheet with new cost info?

The only way I've found to get a part's excel analysis feature to update is if I modify the geometry and force a full regen. That of course is impractical in a large assembly, when all I want to do is update a parameter value in every part.


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.

4 replies

23-Emerald IV
October 31, 2016

Maybe try the config option "regen_solid_before_save".

24-Ruby III
October 31, 2016

Hi,

use Search Tool to select all parts - see following picture.

select.png

After clicking Close, move mouse cursor into graphics window, press right mouse button and use Regenerate command from context menu.

Note: I am not sure if this procedure resolves your problem, because I did not test it.

MH

cstarnes12-AmethystAuthor
12-Amethyst
October 31, 2016

Thanks, but that still doesn't force a regen unless part(s) have changed.

16-Pearl
October 31, 2016

Interesting that you are trying to add Cost information to a CAD object...

As an alternate approach, have you tried to use the "edit Attributes" UI in the workspace to easily modify and populate the cost attribute?  Or maybe you are not in Windchill...but this does open up another possibility of eliminating the need to regenerate if you were.

Capture.JPG

17-Peridot
November 1, 2016

Since there is probably no way to force a complete regen, or worse, 2 regens if some buried routing has to parse out.

Let me suggest a Pro|Workaround (tm) that may just do it:

From your highest level assembly, change the units and have all the children change also.

Change it back.

That should regenerate everything twice.

However, I suggest you make a backup of that top level assembly; clear your session memory; select the backup folder as your working folder; and open the top level.  (clear memory and work on temporary copies).

12-Amethyst
November 2, 2016

If you are going to use always the same parameter I suggest using the find tool to select all the analyses features:

2016-11-02 21_57_06-Search Tool_1.png

Then, supress, resume and regenerate. This may be a way to achieve what you are looking for.

Here is mapkey to do that:

mapkey $F2 @MAPKEY_NAMEAnalysis Regen;@MAPKEY_LABELAnalysis Regen;\

mapkey(continued) ~ Command `ProCmdMdlTreeSearch` ;\

mapkey(continued) ~ Select `selspecdlg0` `SelOptionRadio` 1 `Feature`;\

mapkey(continued) ~ Activate `selspecdlg0` `SelScopeCheck` 1;\

mapkey(continued) ~ Select `selspecdlg0` `RuleTab` 1 `Attributes`;\

mapkey(continued) ~ Select `selspecdlg0` `RuleTypes` 1 `Expression`;\

mapkey(continued) ~ Input `selspecdlg0` `ExtRulesLayout.ExtExprLayout.ExprParamsList` \

mapkey(continued) `UNIT_COST`;\

mapkey(continued) ~ Update `selspecdlg0` `ExtRulesLayout.ExtExprLayout.ExprParamsList` \

mapkey(continued) `UNIT_COST`;\

mapkey(continued) ~ Select `selspecdlg0` `ExtRulesLayout.ExtExprLayout.ExprOperandLabel` 1 ` * \

mapkey(continued) `;~ Activate `selspecdlg0` `EvaluateBtn`;\

mapkey(continued) ~ Select `selspecdlg0` `ResultList` -1;~ Activate `selspecdlg0` `ApplyBtn`;\

mapkey(continued) ~ Activate `selspecdlg0` `CancelButton`;~ Command `ProCmdSuppress` ;\

mapkey(continued) ~ Activate `del_sup_msg` `ok`;~ Command `ProCmdResume` ;\

mapkey(continued) ~ Command `ProCmdRegenAuto` ;

Just replace in lines 8 and 10 your parameter name.

Jose