Reply

Axial align between assembly sketch points

[ Edited ]

 

Hi all

I am trying to add an axial align between two assembly sketch points in a top level assembly. 

When I create an align between two faces, I create a reference to each face and then use objRelations3d.AddPlanar.  This doesn't seem to work for a point on an assembly sketch. 

I can create a planar align between the reference planes of the sketches in each assembly, but can't create references and therefore an align between two sketch points.

Is this possible?

Any help would be much appreciated!

Cheers

Nick

 

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

 

        Dim objAssembly As SolidEdgeAssembly.AssemblyDocument = Nothing

        Dim objRefHole1 As SolidEdgeFramework.Reference = Nothing

        Dim objRefHole2 As SolidEdgeFramework.Reference = Nothing

        Dim objRelAxial1 As SolidEdgeAssembly.AxialRelation3d = Nothing

        Dim objRelAxial2 As SolidEdgeAssembly.AxialRelation3d = Nothing

        Dim objRelPlanar As SolidEdgeAssembly.PlanarRelation3d = Nothing

        Dim objRelGround As SolidEdgeAssembly.GroundRelation3d = Nothing

        Dim objApplication As SolidEdgeFramework.Application = Nothing

        Dim objDocuments As SolidEdgeFramework.Documents = Nothing

        Dim objOccurrences As SolidEdgeAssembly.Occurrences = Nothing

        Dim objOccurrence1 As SolidEdgeAssembly.Occurrence = Nothing

        Dim objLayout As SolidEdgeAssembly.Layout = Nothing

        Dim objLayouts As SolidEdgeAssembly.Layouts = Nothing

        Dim objProfile As Object = Nothing

        Dim objOccurrencePart As SolidEdgePart.PartDocument = Nothing

        Dim objOccurrenceAssy As SolidEdgeAssembly.AssemblyDocument = Nothing

        Dim objOccurrence2 As SolidEdgeAssembly.Occurrence = Nothing

        Dim objRelations3d As SolidEdgeAssembly.Relations3d = Nothing

        Dim objPoint As SolidEdgeFrameworkSupport.Point2d = Nothing

 

 

        objApplication = Marshal.GetActiveObject("SolidEdge.Application")

        objDocuments = objApplication.Documents

        objAssembly = objDocuments.Add("SolidEdge.AssemblyDocument")

        objOccurrences = objAssembly.Occurrences

 

        objOccurrence1 = objOccurrences.AddByFilename("C:\ManifoldAssembly\CFR1_0.asm")

 

        objOccurrenceAssy = objOccurrence1.OccurrenceDocument

 

        objLayouts = objOccurrenceAssy.Layouts

 

        For Each objLayout In objLayouts

            If objLayout.Name = "Hole3" Then

                objPoint = objLayout.Profile.points2d(1)

                objRefHole1 = objAssembly.CreateReference(objOccurrence1, objPoint) 'This doesn't work

            End If

        Next

 

        objOccurrence2 = objOccurrences.AddByFilename("C:\ManifoldAssembly\CCV1_0.asm")

 

        objOccurrenceAssy = objOccurrence2.OccurrenceDocument

 

        objLayouts = objOccurrenceAssy.Layouts

 

        For Each objLayout In objLayouts

            If objLayout.Name = "Hole3" Then

                objPoint = objLayout.Profile.points2d(1)

                objRefHole2 = objAssembly.CreateReference(objOccurrence2, objPoint)

            End If

        Next

 

        objRelations3d = objAssembly.Relations3d

        objRelGround = objRelations3d.Item(2)

        objRelGround.Delete()

 

        objRelAxial1 = objRelations3d.AddAxial(objRefHole1, objRefHole2, True)

 

Posted by: Nick Whitehead
Post date: 11/17/2008 2:04:49 AM

1 REPLY

RE: Axial align between assembly sketch points

[ Edited ]

 

I've spoken to our Solid Edge supplier about this and he's spoken to Siemens.  It's not possible to axial align sketch points.

 

Posted by: Nick Whitehead
Post date: 11/23/2008 10:07:59 PM