Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Orient Two UCS together

Saikiran_arakeri
Enthusiast

Orient Two UCS together

Saikiran_arakeri
Enthusiast
Enthusiast

Hi, there are two UCS in this scenario, 1. Part-CS, 2. Local-CS. I am trying to orient the LCS with the PCS and incline them in the same orientation, I am doing this so that I can perform UCS to UCS constraint. 

 

Saikiran_arakeri_0-1688706584188.png

 

The axis marked in blacked are of PCS and the other is LCS, I created the LCS at the center point of the PCS, but I am not able to orient each other. Please help. @WCrihfield @Andrii_Humeniuk @A.Acheson @JelteDeJong 

0 Likes
Reply
Accepted solutions (1)
1,619 Views
26 Replies
Replies (26)

Andrii_Humeniuk
Advisor
Advisor

Hi @Saikiran_arakeri . When you change the Local-CS coordinates, you need to run this code again.

Dim oDoc As PartDocument = ThisDoc.Document
Dim oUCSs As UserCoordinateSystems = oDoc.ComponentDefinition.UserCoordinateSystems
Dim oLCS, oPCS As UserCoordinateSystem
Try : oLCS = oUCSs("Local-CS") : Catch : Exit Sub : End Try
Dim oOrigin, oXDirect, oYDirect As Inventor.Vertex
If oUCSs("Part-CS") IsNot Nothing Then
	oPCS = oUCSs("Part-CS")
	oPCS.Definition.Transformation = oLCS.Definition.Transformation
Else
	oPCS = oUCSs.Add(oLCS.Definition)
	oPCS.Name = "Part-CS"
End If

 

Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor

LinkedIn | My free Inventor Addin | My Repositories

Did you find this reply helpful ? If so please use the Accept as Solution/Like.

EESignature

WCrihfield
Mentor
Mentor

Hi @Saikiran_arakeri.  Have you tried just creating that 'UCS to UCS' constraint, without aligning the two UCS's first?  Adding the constraint should automatically allign them for you when it is applied.  Since you mentioned adding a constraint, I assume then that these two UCS objects are in the context of an assembly, instead of both being within a single part, right?  The UCS to UCS type constraint is an iLogic only snippet, and basically created 3 different flush type constraints (Link, Link) for you, using the WorkPlanes of either the specified UCS objects, or the Origin of the component.  If you specify "Origin", instead of the name of a UCS, it will use the origin WorkPlanes of the component instead of a UCS's WorkPlanes.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes

Saikiran_arakeri
Enthusiast
Enthusiast

Hi @WCrihfield, I tried using the direct UCS to UCS constraint, but what happened was, it aligned the PCS with the LCS, now, the LCS is inclined with the default inclination when created, hence the inclination in which the part was placed is getting disturbed. I want it to work the other way around, which is, I want the LCS to align with the PCS so that the part inclination is retained. 

0 Likes

Saikiran_arakeri
Enthusiast
Enthusiast

Hey @Andrii_Humeniuk, Thank you so much, this worked perfectly.

WCrihfield
Mentor
Mentor

Hi @Saikiran_arakeri.  Have you tried simply reversing which UCS you specify first and which one you specify second when creating that UCS to UCS constraint.  There are many situations in Inventor where the order in which you select things makes all the difference.  When I manually create a UCS to UCS constraint by selecting the Assemble tool, then selecting UCS to UCS type, the first UCS I select is the one that will be moved to the position of the second UCS, as long as neither component is grounded (or otherwise constrained).

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes

Saikiran_arakeri
Enthusiast
Enthusiast

Hey @Andrii_Humeniuk, Sadly this didn't work, what's happening is the PCS is getting disturbed and shifting to a new position where as the LCS is in the correct position but the inclination is still incorrect.

 

Saikiran_arakeri_1-1688997284503.png

Red is the PCS here and Blue is the LCS

0 Likes

Saikiran_arakeri
Enthusiast
Enthusiast
Hey @WCrihfield, tried this as well, it didn't work.
0 Likes

WCrihfield
Mentor
Mentor

Hi @Saikiran_arakeri.  As a test on my end, I created two parts that loosely look like a UCS, to make ethier orientation visibly obvious.  Then I created a UCS within each of those two nearly identical parts that was aligned with the origin planes of the parts.  Then I created a new assembly, and placed one of each of those two parts into the assembly, in different orientations.  Below is a screen capture of that assembly.

WCrihfield_2-1688999965048.png

As you can see, both parts are identical, but have slightly different file names, and are in different orientations, and neither one has been grounded or constrained in any way yet.  And I have two internal iLogic rules there for creating the UCS to UCS constraint in the two different orders. My first couple tries, where both codes were just the one line of code, but in reversed order, they were working perfect, but then they stopped working as expected.  At first, one rule would cause the first part to align with the second perfectly, then the other rule would cause the second part to align with the first part perfectly, but then they both started acting the same (both were aligning the second part with the first part).  So, I slightly changed the second rule to first ground the component I did not want to move, then create the constraint, then update the document, then remove the grounded status, and that worked like a charm.

Below are the contents of those two rules:

Add UCS to UCS Constraint 1

Constraints.AddUcsToUcs("UCS to UCS 1", "Coordinates Part:1", "UCS1", "Coordinates Part 2:2", "UCS1", 0, 0, 0)

Add UCS to UCS Constraint 2

Component.InventorComponent("Coordinates Part 2:2").Grounded = True
Constraints.AddUcsToUcs("UCS to UCS 2", "Coordinates Part 2:2", "UCS1", "Coordinates Part:1", "UCS1", 0, 0, 0)
iLogicVb.DocumentUpdate
Component.InventorComponent("Coordinates Part 2:2").Grounded = False

When I run the first rule, this is the result:

WCrihfield_1-1688998191969.png

Then I undo what that rule did, and run the second rule, and this is the result of that second rule:

WCrihfield_3-1689000059455.png

So in this case, since this is sort of a compound constraint (actually creates 3 constraints, not just one), you simply have to ground (or otherwise fully constrain) the one you do not want to move first, then apply the constraint, then update the assembly (important), then remove the grounded state from the one component after the document has been updated.  If I left out the update step, it would not work right, and it would update the model after the rule was done (after the grounded state was removed), which would cause the second part to move, instead of the first part.  But this was the simplest way I found to do this process.  There are surely other ways to do this too, but this way just seems to require the least code, and takes advantage of the iLogic shortcut snippets.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

J-Camper
Advisor
Advisor

@Saikiran_arakeri,

 

I think there may be limitations to moving the UCS in assembly. I can't as a user move the assembly UCS by dragging, only by redefining the feature, and manually created constraints won't let me move the UCS either.

 

If you use the transformation of the PCS and it's containing occurrence Transformation to create the assembly UCS, then you could constrain together without moving the Part:

 

 

Dim aDoc As AssemblyDocument = TryCast(ThisApplication.ActiveDocument, AssemblyDocument)
If IsNothing(aDoc) Then Logger.Debug("Not Run In Assembly Document") : Exit Sub

Dim PickUCS As Object = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kUserCoordinateSystemFilter, "Select UCS create aligned in assembly")
If IsNothing(PickUCS) Then Exit Sub ' If nothing gets selected then we're done

Dim TransformMatrix As Matrix = PickUCS.Transformation.Copy

If PickUCS.Type = ObjectTypeEnum.kUserCoordinateSystemProxyObject
	TransformMatrix.TransformBy(PickUCS.ContainingOccurrence.Transformation)
End If

Dim UCSdef As UserCoordinateSystemDefinition = aDoc.ComponentDefinition.UserCoordinateSystems.CreateDefinition

UCSdef.Transformation = TransformMatrix

aDoc.ComponentDefinition.UserCoordinateSystems.Add(UCSdef)

or you could transform an already created assembly UCS to the part UCS before constraining:

 

 

Dim aDoc As AssemblyDocument = TryCast(ThisApplication.ActiveDocument, AssemblyDocument)
If IsNothing(aDoc) Then Logger.Debug("Not Run In Assembly Document") : Exit Sub

Dim PickUCS As UserCoordinateSystem = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kUserCoordinateSystemFilter, "Select UCS to move")
If IsNothing(PickUCS) Then Exit Sub ' If nothing gets selected then we're done

Dim PickUCStarget As UserCoordinateSystem = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kUserCoordinateSystemFilter, "Select UCS to set Position")
If IsNothing(PickUCStarget) Then Exit Sub ' If nothing gets selected then we're done

Dim TransformMatrix As Matrix = PickUCStarget.Transformation.Copy

If PickUCStarget.Type = ObjectTypeEnum.kUserCoordinateSystemProxyObject
	TransformMatrix.TransformBy(PickUCStarget.ContainingOccurrence.Transformation)
End If

PickUCS.Transformation = TransformMatrix

 

 

0 Likes

Saikiran_arakeri
Enthusiast
Enthusiast

Hey @J-Camper, tried both the approaches, sadly again it didn't work, I faced the same situation that I posted about here: https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/orient-two-ucs-together/m-p/12091289...

0 Likes

Saikiran_arakeri
Enthusiast
Enthusiast

Hey @WCrihfield, any idea of doing this https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/orient-two-ucs-together/m-p/12091428... in C#?

 

I understand what you explained, thank you so much for that, I'm not able to do it code-vise, my UCS is orienting in the default way.

0 Likes

Andrii_Humeniuk
Advisor
Advisor

Hi @Saikiran_arakeri . If I understand you correctly, you want to create constraints of the LCS that is in the assembly between the PCS that is in the part. If so, here is the code (iLogic):

 

Sub main
	Dim oDoc As Document = ThisDoc.Document
	If Not TypeOf oDoc Is AssemblyDocument Then Exit Sub
	Dim oAsmDoc As AssemblyDocument = oDoc
	Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition
	Dim oUCSs As UserCoordinateSystems = oAsmDef.UserCoordinateSystems
	Dim oLCS, oPCS As UserCoordinateSystem
	Try : oLCS = oUCSs("Local-CS") : Catch : Exit Sub : End Try
	Dim oCM As CommandManager = ThisApplication.CommandManager
	Dim oOcc As ComponentOccurrence
	oOcc = oCM.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "Select your part with 'Part-CS'")
	If oOcc Is Nothing Then Exit Sub
	If oOcc.DefinitionDocumentType <> DocumentTypeEnum.kPartDocumentObject Then Exit Sub
	Dim oOccDef As PartComponentDefinition = oOcc.Definition
	Try : oPCS = oOccDef.UserCoordinateSystems("Part-CS") : Catch : Exit Sub : End Try
	If oOcc.Constraints("(X)LCS to PCS") IsNot Nothing Then oOcc.Constraints("(X)LCS to PCS").Delete()
	If oOcc.Constraints("(Y)LCS to PCS") IsNot Nothing Then oOcc.Constraints("(Y)LCS to PCS").Delete()
	If oOcc.Constraints("(Z)LCS to PCS") IsNot Nothing Then oOcc.Constraints("(Z)LCS to PCS").Delete()
	Dim oCnTr As AssemblyConstraints = oAsmDef.Constraints
	Dim proxyXAxis, proxyYAxis, proxyZAxis As WorkAxisProxy
	Call oOcc.CreateGeometryProxy(oPCS.XAxis, proxyXAxis)
	Call oOcc.CreateGeometryProxy(oPCS.YAxis, proxyYAxis)
	Call oOcc.CreateGeometryProxy(oPCS.ZAxis, proxyZAxis)
	Dim oMateX, oMateY, oMateZ As MateConstraint
	oMateX = oCnTr.AddMateConstraint(proxyXAxis, oLCS.XAxis, 0) : oMateX.Name = "(X)LCS to PCS"
	oMateY = oCnTr.AddMateConstraint(proxyYAxis, oLCS.YAxis, 0) : oMateY.Name = "(Y)LCS to PCS"
	oMateZ = oCnTr.AddMateConstraint(proxyZAxis, oLCS.ZAxis, 0) : oMateZ.Name = "(Z)LCS to PCS"
End Sub

 

  If my guess is wrong, please explain your situation fully, thanks.

Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor

LinkedIn | My free Inventor Addin | My Repositories

Did you find this reply helpful ? If so please use the Accept as Solution/Like.

EESignature

0 Likes

Saikiran_arakeri
Enthusiast
Enthusiast

Hey @Andrii_Humeniuk, so, here's what's happening. I have an assembly where in there is a component that has it's own UCS, let's call it PCS (Part-CS). This is inclined in some way. I have to create a new UCS, let's call it LCS (Local-CS) in the assembly at the exact same location where PCS is and orient it in the same way as well. I am orienting it in the same way as only then the UCS to UCS constraint is possible. 

 

Saikiran_arakeri_0-1689063816520.png

 

As you can see here, there is a part that has it's own PCS. I have created a LCS in the assembly at the exact same location. Now, I am struggling to orient it the same way as PCS. The axis marked in black here is of LCS and the other PCS. The UCS in the left bottom is the Global-CS. 

0 Likes

Saikiran_arakeri
Enthusiast
Enthusiast

Hey @Andrii_Humeniuk, tried the solution that you gave, instead of inclining LCS with the PCS, PCS is getting inclined with the LCS.

 

This is the part in the assembly before running the code

Saikiran_arakeri_0-1689070201019.png

 

This is the part in the assembly after running the code

Saikiran_arakeri_1-1689070261861.png

 

0 Likes

Andrii_Humeniuk
Advisor
Advisor

Try this code:

Sub main
	Dim oDoc As Document = ThisDoc.Document
	If Not TypeOf oDoc Is AssemblyDocument Then Exit Sub
	Dim oAsmDoc As AssemblyDocument = oDoc
	Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition
	Dim oUCSs As UserCoordinateSystems = oAsmDef.UserCoordinateSystems
	Dim oLCS, oPCS As UserCoordinateSystem
	Dim oCM As CommandManager = ThisApplication.CommandManager
	Dim oOcc As ComponentOccurrence
	oOcc = oCM.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "Select your part with 'Part-CS'")
	If oOcc Is Nothing Then Exit Sub
	If oOcc.DefinitionDocumentType <> DocumentTypeEnum.kPartDocumentObject Then Exit Sub
	Dim oOccDef As PartComponentDefinition = oOcc.Definition
	Try : oPCS = oOccDef.UserCoordinateSystems("Part-CS") : Catch : Exit Sub : End Try
	Try : oLCS = oUCSs("Local-CS")
	Catch
		Dim oUCSDef As UserCoordinateSystemDefinition = oUCSs.CreateDefinition()
		oUCSDef.Transformation = oPCS.Transformation
		oLCS = oUCSs.Add(oUCSDef)
		oLCS.Name = "Local-CS"
	End Try
	If oOcc.Constraints.Count > 0 Then
		If oOcc.Constraints("(X)LCS to PCS") IsNot Nothing Then oOcc.Constraints("(X)LCS to PCS").Delete()
		If oOcc.Constraints("(Y)LCS to PCS") IsNot Nothing Then oOcc.Constraints("(Y)LCS to PCS").Delete()
		If oOcc.Constraints("(Z)LCS to PCS") IsNot Nothing Then oOcc.Constraints("(Z)LCS to PCS").Delete()
	End If
	Dim oCnTr As AssemblyConstraints = oAsmDef.Constraints
	Dim proxyXAxis, proxyYAxis, proxyZAxis As WorkAxisProxy
	Call oOcc.CreateGeometryProxy(oPCS.XAxis, proxyXAxis)
	Call oOcc.CreateGeometryProxy(oPCS.YAxis, proxyYAxis)
	Call oOcc.CreateGeometryProxy(oPCS.ZAxis, proxyZAxis)
	Dim oMateX, oMateY, oMateZ As MateConstraint
	oMateX = oCnTr.AddMateConstraint(proxyXAxis, oLCS.XAxis, 0) : oMateX.Name = "(X)LCS to PCS"
	oMateY = oCnTr.AddMateConstraint(proxyYAxis, oLCS.YAxis, 0) : oMateY.Name = "(Y)LCS to PCS"
	oMateZ = oCnTr.AddMateConstraint(proxyZAxis, oLCS.ZAxis, 0) : oMateZ.Name = "(Z)LCS to PCS"
End Sub

 Remember, if your component has no Constraints, then both the component and the Local-CS will be movable in the assembly.

Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor

LinkedIn | My free Inventor Addin | My Repositories

Did you find this reply helpful ? If so please use the Accept as Solution/Like.

EESignature

0 Likes

Saikiran_arakeri
Enthusiast
Enthusiast

 

I hope you can see what's happening here. The part is not constrained nor grounded.

0 Likes

Andrii_Humeniuk
Advisor
Advisor
Accepted solution

I hope this is exactly what you need.

 

Sub main
	Dim oDoc As Document = ThisDoc.Document
	If Not TypeOf oDoc Is AssemblyDocument Then Exit Sub
	Dim oAsmDoc As AssemblyDocument = oDoc
	Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition
	Dim oUCSs As UserCoordinateSystems = oAsmDef.UserCoordinateSystems
	Dim oLCS, oPCS As UserCoordinateSystem
	Dim oCM As CommandManager = ThisApplication.CommandManager
	Dim oOcc As ComponentOccurrence
	oOcc = oCM.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "Select your part with 'Part-CS'")
	If oOcc Is Nothing Then Exit Sub
	If oOcc.DefinitionDocumentType <> DocumentTypeEnum.kPartDocumentObject Then Exit Sub
	Dim oOccDef As PartComponentDefinition = oOcc.Definition
	Try : oPCS = oOccDef.UserCoordinateSystems("Part-CS") : Catch : Exit Sub : End Try
	Try : oLCS = oUCSs("Local-CS") : Catch : End Try
	If oOcc.Constraints.Count > 0 Then
		Try : oOcc.Constraints("(X)LCS to PCS").Delete() : Catch : End Try
		Try : oOcc.Constraints("(Y)LCS to PCS").Delete() : Catch : End Try
		Try : oOcc.Constraints("(Z)LCS to PCS").Delete() : Catch : End Try
	End If
	If oLCS IsNot Nothing Then oLCS.Delete()
	
	Dim proxyXAxis, proxyYAxis, proxyZAxis As WorkAxisProxy
	Dim proxyPoint As WorkPointProxy
	Call oOcc.CreateGeometryProxy(oPCS.XAxis, proxyXAxis)
	Call oOcc.CreateGeometryProxy(oPCS.YAxis, proxyYAxis)
	Call oOcc.CreateGeometryProxy(oPCS.ZAxis, proxyZAxis)
	Call oOcc.CreateGeometryProxy(oPCS.Origin, proxyPoint)
	Dim oUCSDef As UserCoordinateSystemDefinition = oUCSs.CreateDefinition()
	oUCSDef.Transformation.SetCoordinateSystem(proxyPoint.Point, _
											   proxyXAxis.Line.Direction.AsVector, _
											   proxyYAxis.Line.Direction.AsVector, _
											   proxyZAxis.Line.Direction.AsVector)
	oLCS = oUCSs.Add(oUCSDef)
	oLCS.Name = "Local-CS"
	
	Dim oCnTr As AssemblyConstraints = oAsmDef.Constraints
	Dim oMateX, oMateY, oMateZ As MateConstraint
	oMateX = oCnTr.AddMateConstraint(proxyXAxis, oLCS.XAxis, 0) : oMateX.Name = "(X)LCS to PCS"
	oMateY = oCnTr.AddMateConstraint(proxyYAxis, oLCS.YAxis, 0) : oMateY.Name = "(Y)LCS to PCS"
	oMateZ = oCnTr.AddMateConstraint(proxyZAxis, oLCS.ZAxis, 0) : oMateZ.Name = "(Z)LCS to PCS"
End Sub

Or:

Sub main
	Dim oDoc As Document = ThisDoc.Document
	If Not TypeOf oDoc Is AssemblyDocument Then Exit Sub
	Dim oAsmDoc As AssemblyDocument = oDoc
	Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition
	Dim oUCSs As UserCoordinateSystems = oAsmDef.UserCoordinateSystems
	Dim oLCS, oPCS As UserCoordinateSystem
	Dim oCM As CommandManager = ThisApplication.CommandManager
	Dim oMatrix As Matrix = ThisApplication.TransientGeometry.CreateMatrix
	Dim oOcc As ComponentOccurrence
	oOcc = oCM.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "Select your part with 'Part-CS'")
	If oOcc Is Nothing Then Exit Sub
	If oOcc.DefinitionDocumentType <> DocumentTypeEnum.kPartDocumentObject Then Exit Sub
	Dim oOccDef As PartComponentDefinition = oOcc.Definition
	Try : oPCS = oOccDef.UserCoordinateSystems("Part-CS") : Catch : Exit Sub : End Try
	Dim proxyXAxis, proxyYAxis, proxyZAxis As WorkAxisProxy
	Dim proxyPoint As WorkPointProxy
	Call oOcc.CreateGeometryProxy(oPCS.XAxis, proxyXAxis)
	Call oOcc.CreateGeometryProxy(oPCS.YAxis, proxyYAxis)
	Call oOcc.CreateGeometryProxy(oPCS.ZAxis, proxyZAxis)
	Call oOcc.CreateGeometryProxy(oPCS.Origin, proxyPoint)
	Try 
		oLCS = oUCSs("Local-CS")
		oMatrix.SetCoordinateSystem(proxyPoint.Point, _
												   proxyXAxis.Line.Direction.AsVector, _
												   proxyYAxis.Line.Direction.AsVector, _
												   proxyZAxis.Line.Direction.AsVector)
		oLCS.Transformation = oMatrix
	Catch
		Dim oUCSDef As UserCoordinateSystemDefinition = oUCSs.CreateDefinition()
		oUCSDef.Transformation.SetCoordinateSystem(proxyPoint.Point, _
												   proxyXAxis.Line.Direction.AsVector, _
												   proxyYAxis.Line.Direction.AsVector, _
												   proxyZAxis.Line.Direction.AsVector)
		oLCS = oUCSs.Add(oUCSDef)
		oLCS.Name = "Local-CS"
	End Try	
End Sub

 

Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor

LinkedIn | My free Inventor Addin | My Repositories

Did you find this reply helpful ? If so please use the Accept as Solution/Like.

EESignature

0 Likes

J-Camper
Advisor
Advisor

@Saikiran_arakeri,

 

It is weird that the part would move after aligning the UCSs, I would expect it shouldn't want to move while adding Flush constraints to matching planes with no offset.  It seems like the assembly UCS wasn't actually getting aligned before constraints were added if you are still getting the issue you stated before. 

 

The assembly UCS will never yield to the part UCS, so we need to fully align the 2 before making the constraints if you want to preserve the part's transformation.  If UCSs moved with constraints it would defeat their purpose.

 

Can you share your test assembly?  Maybe there is something going on that i can't reproduce on my own.  I only tested a part occurrence in and assembly, is your part in a deeper level than that?  It might need more transforms to get the UCSs to align.

0 Likes

WCrihfield
Mentor
Mentor

Hi @Saikiran_arakeri.  Once you create the UCS within the context of the assembly, and get it in the same position and orientation as the UCS that is within the part type component, what do you intent to do at that point?  Both the component and the UCS that you created within the assembly would both still be unconstrained.  Do you intend to create a constraint between the UCS within the part, and the UCS that you created in the assembly?  If so, that still would not solve anything, because they would both still be fully movable in every way.  One of the two objects simply needs to be constrained in some other way before constraining one to the other, or some unexpected movement is bound to happen on either side.  Maybe once you get the UCS that you created within the assembly into position & orientation of the one in the part, you then need to somehow inspect the position and orientation of that UCS that you created within the assembly, and use those measurements to constrain it relative to the assembly's native origin WorkPlanes.  Then once that is done, create the UCS to UCS constraint between that UCS, and the one in the part.  That way the one you created in the assembly will not be able to move when you create the constraints between them.  Do you understand what I am talking about here?

It would be pretty simple to simply create a new UCS in the assembly that is in the same position and orientation as the one in the part, but a UCS is just like a newly added component in some ways, because it too needs to be constrained to keep it from moving, and constraining it to an unconstrained component does not solve anything yet.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes