Public Sub ClientGraphicsFromSATFileBody()
' Set a reference to the TransientBRep object
Dim oTransientBRep As TransientBRep
Set oTransientBRep = ThisApplication.TransientBRep
' Get the first body from the specified sat file
Dim oBody As SurfaceBody
Set oBody = oTransientBRep.ReadFromFile("D:\123.sat").Item(1)
'oBody.Faces(1).
' Create a new Part document.
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.Documents.Add(kPartDocumentObject)
' Set a reference to the compdef.
Dim oCompDef As PartComponentDefinition
Set oCompDef = oPartDoc.ComponentDefinition
' Create the ClientGraphics object.
Dim oClientGraphics As ClientGraphics
Set oClientGraphics = oCompDef.ClientGraphicsCollection.Add("Sample3DGraphicsID")
' Create a new graphics node within the client graphics objects.
Dim oSurfacesNode As GraphicsNode
Set oSurfacesNode = oClientGraphics.AddNode(1)
' Create client graphics based on the transient body
Dim oSurfaceGraphics As SurfaceGraphics
Set oSurfaceGraphics = oSurfacesNode.AddSurfaceGraphics(oBody)
Dim color As color: Set color = ThisApplication.TransientObjects.CreateColor(0, 0, 255)
oSurfaceGraphics.color = color
' Update the view to see the resulting curves.
ThisApplication.ActiveView.Update
End Sub