PTC_CONSTRAINT_SET Doesn't quite work properly using relations.
Through the power of search, I found this parameter (PTC_CONSTRAINT_SET) to help me insert a single part into an assembly, and place it in different locations using different constraint sets. During my search, I found this and used it in my assembly relations.
if POSITION == 2
PTC_CONSTRAINT_SET:FID_40 = "Set_no_2"
endif
if POSITION == 1
PTC_CONSTRAINT_SET:FID_40 = "Set_no_1"
endif
It works exactly how I need EXCEPT, the sub-assembly is dynamic, meaning when condition 2 exists, the rest of the sub-assembly changes sizes. When condition 1 exists, the part is located on the side, when condition 2 exists, it is located on the front. It positions the parte parallel to all of its constraints upon regenerate, but it does not "snap" to the surface It needs to. Although the sub-assembly is changing dimensionally, the parts are the same, and the constraining surfaces are the same, so no constraints are being broken, they just aren't "snapping" to the surfaces they should.
When I hit edit definition, it immediately constrains exactly how it should without me hitting any other buttons. If I revert back to condition 1, it positions it correctly as if the actual sub-assembly did not change dimensionally from the last size (but since it did change sizes, the part is not located in the correct spot) . Not until I hit "Edit Definition" does it snap to the correct surfaces.
It knows what it needs to do but it won't do it until I hit "Edit Definition". I have noticed this happen before randomly while using Creo, but we have not been using the PTC_CONSTRAINT_SET until now. We normally insert the component multiple times and use programming to turn FID on or off. This is cumbersome, but as with many options in CREO, they don't seem to ever work 100 percent properly, so we usually have to find an old outdated clunky way to make things happen. No matter how many regens I do, the part will not snap back into place until "Edit Definition" is clicked. Frustrated....

