cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Remove All Assembly Constraints

doneill
14-Alexandrite

Remove All Assembly Constraints

I have some assemblies where I need to remove all the assembly constraints. 

I can do it one component at a time but I could really use a faster method.  

Most of the components are "Frozen" or  "Suspended"  with broken constraints.

Thanks

 

6 REPLIES 6

I don't know of an out-of-the box method of stripping out the constraints of assembly's components.

 

However, IMO, having an assembly full of unplaced components is just as bad as having an assembly full of suspended/frozen components.  So I'm not sure what your plan is for fixing the problem, but seems like ultimately you will have to address each component one by one.  Perhaps you can use this mapkey or modify it to suit your needs to speed things up:

 

mapkey $F10 @MAPKEY_NAMEReplace 1st constraint set with Fix constraint;\
@MAPKEY_LABELImpose Fix constraint;\
~ Command `ProCmdRedefine`;\
~ Activate `main_dlg_cur` `chkbn.ScrLayout.0` 1;\
~ PopupOver `ScrLayout.1.0` `PH.INST_RMB_.l0` 1 `PH.PIM_chk.l0`;\
~ Activate `ScrLayout.1.0` `PH.DELETE_PB_.l0`;\
~ Select `ScrLayout.1.0` `PH.pop_constr_offset_type` 1 `Fixed`;\
~ Activate `main_dlg_cur` `dashInst0.stdbtn_1`;

 

(to use, select a component, then press F10 - the component's constraint set will be removed, and a single "Fixed" constraint will be imposed)

doneill
14-Alexandrite
(To:pausob)

Stripping out all of the constraints is just the first step in what I'm trying to do.  

The assemblies I'm working with are full of useless or broken constraints,

and components that are not in a good order.  I know other people have the same issues...

 

After I remove all the constraints I will easily be able to reorder my components and then constrain them properly.

 

Thanks for the Mapkey code... but it seems like there should be some Mapkey commands that would allow me to select all filtered components... or run a loop of code.  

Thanks

 

KenFarley
21-Topaz I
(To:doneill)

I think what was being suggested is that, inevitably, to repair the assembly, you're going to be forced to redefine the constraints of every messed up component. So, since it's unavoidable, why not just go straight to redefining? I've had some horrible botched up assemblies and had to do this. Sometimes, to avoid making poor selections or just to simplify things, I hide all the problem components and then unhide them one at a time as they are addressed.

I definitely don't envy you in this task.

doneill
14-Alexandrite
(To:KenFarley)

Thanks for the feedback...

Going straight to "Redefine" is fine but I wanted to reorder my components and then constrain. 

There seemed to be some constraints that were hindering the reorder process. 

I can remove them as I go but it would have been nice to just strip out everything first.   

 

If everything was "Packaged", I could select all and "Fix" (temporarily), but most of these components are "Frozen".  

 

Thanks again

doneill
14-Alexandrite
(To:pausob)

Is there a way to create a Looping Mapkey?

Hidetaka
15-Moonstone
(To:doneill)

Three years have passed, I hope that you found the solution, or at least a workaround.

 

I think what you are asking for is not a Creo functionality, but it is possible with the help of some automation scripts.

 

Here is how to do it.

 

Step 1. Create a list of assembly components. 

The easiest way is to create an assembly drawing and export its repeat region, which include all the components' name.

 

Step 2. Create a mapkey to detete all constraints of a components.

 

Step 3. Make the mapkey dynamic.

By "dynamic", I means the mapkey can take arguments like a function. 

It is very likely that the mapkey in step 2 will only work with one component, and you can see the component name in the mapkey text in .pro file.

Making the mapkey dynamic means making it work with any component by creating a new mapkey (with automation scripts) for each component and load the new mapkey into session. 

 

Step 4. Loop through the components in the list created in step 1 (using automation scripts) and run the dynamic mapkey on each iteration.

 

I recommend using AutoHotkey to write the scripts. It is very easy to learn and use.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags