Overview

The GeomView class is a Windows Form that can display STEP 3D geometry. The class has a selection of functions for querying the STEP product structure, controlling visibility, color, and other presentation attributes.

The functions, events, and properties listed below are documented with Visual Basic-style prototypes, but can be used from any language that supports .NET calls, like C#, C++/CLI, or J#.

Whenever the functions refer to STEP instance data, it does so using an integer handle that corresponds to the entity ID number in a STEP exchange file. You can investigate the particular instance by opening the file with the STEP File Browser and searching for that instance number.

PickEdge Event

Event PickEdge(
	ByVal eid As Long, 
	ByVal x As Double, 
 	ByVal y As Double, 
	ByVal z As Double
	)

The PickEdge event is raised when the MouseMode Property is MouseModeValue.PickEdge and an edge is selected. The callback returns the STEP ID of the selected edge instance and the 3D coordinates of the mouse click.

PickFace Event

Event PickFace(
	ByVal eid As Long, 
	ByVal x As Double, 
 	ByVal y As Double, 
	ByVal z As Double
	)

The PickFace event is raised when the MouseMode Property is MouseModeValue.PickFace and a face is selected. The callback returns the STEP ID of the selected face instance and the 3D coordinates of the mouse click.

PickShape Event

Event PickShape(
	ByVal eid As Long, 
	ByVal x As Double, 
 	ByVal y As Double, 
	ByVal z As Double
	)

The PickShape event is raised when the MouseMode Property is MouseModeValue.PickShape and a shape is selected. The callback returns the STEP ID of the selected shape representation instance and the 3D coordinates of the mouse click.

ClearSelection()

Sub ClearSelection()

The ClearSelection() function clears the selected shape, face, or edge and redraws item in its normal color.

ColorClear()

Sub ColorClear(
	ByVal eid As Long, 
	ByVal recursive As Boolean
	)

The ColorClear() function removes all color information from an instance. Without any color information, the instance will be drawn in the color of its scenegraph parent. If the recursive parameter is true, the function also clears the color on all scenegraph children of the instance.

See Also

ColorDefault(); ColorInstance()

ColorClearDefault()

Sub ColorClearDefault(
	ByVal eid As Long, 
	ByVal recursive As Boolean
	)

The ColorClearDefault() function removes any STEP file color information associated with the instance. This will clear the color the next time ColorDefault is called. If the recursive parameter is true, it also clears the defaults on all scenegraph children of the instance.

ColorDefault()

Sub ColorDefault(
	ByVal eid As Long, 
	ByVal recursive As Boolean
	)

The ColorDefault() function restores an instance to the default color, if any, given in the STEP file. If the recursive parameter is true, the function also restores the default color on all scenegraph children of the instance.

See Also

ColorClearDefault(); ColorInstance()

ColorInstance()

Sub ColorInstance(
	ByVal eid As Long, 
	ByVal rgb As Integer
	)

The ColorInstance() function sets the color of an instance to an RGB value. If the color information is cleared by calling ColorClear(), the instance will inherit the color of its parent in the scenegraph. When a STEP file is read in, each instance is initialized with any color information present in the file. If there is no color information in the file, everything is drawn in a neutral gray. You can restore the original STEP file color by calling ColorDefault().

Example

The following example code creates a Windows color dialog, gets the color value back from the user, and then applies it to an instance.

Dim cv As GeomView
Dim eid As Long
Dim dlg As ColorDialog = New ColorDialog
If (dlg.ShowDialog <> DialogResult.OK) Then
   Return
End If

cv.ColorInstance(eid, dlg.Color.ToArgb)

See Also

ColorClear(); ColorDefault()

GetHeaderAuthor()

Function GetHeaderAuthor() As List(Of String)

The GetHeaderAuthor() function returns the "Author" value found in the FILE_NAME portion of the STEP file header. This is a list of strings that identifies the person who created the file. See GetHeaderSchema() for an example using all of the STEP header functions.

See Also

GetHeaderDescription(); GetHeaderImplementationLevel(); GetHeaderName(); GetHeaderOrganization(); GetHeaderOriginatingSystem(); GetHeaderPreprocessorVersion(); GetHeaderSchema(); GetHeaderTimestamp()

GetHeaderDescription()

Function GetHeaderDescription() As List(Of String)

The GetHeaderDescription() function returns the "Description" value found in the FILE_DESCRIPTION portion of the STEP file header. This list of strings gives a text description of the contents, history, or purpose of the file. See GetHeaderSchema() for an example using all of the STEP header functions.

See Also

GetHeaderAuthor(); GetHeaderImplementationLevel(); GetHeaderName(); GetHeaderOrganization(); GetHeaderOriginatingSystem(); GetHeaderPreprocessorVersion(); GetHeaderSchema(); GetHeaderTimestamp()

GetHeaderImplementationLevel()

Function GetHeaderImplementationLevel() As String

The GetHeaderImplementationLevel() function returns the "Implementation_level" value found in the FILE_DESCRIPTION portion of the STEP file header. This string contains a code that identifies the version of the ISO 10303-21 exchange syntax used to write the file, which is different from the schema that describes the instance data. See GetHeaderSchema() for an example using all of the STEP header functions.

The typical value is "2;1" which corresponds to the corrected syntax published in 1996 (ISO 10303-21:1994, Corr 1:1996) and also used by the second edition of Part 21 (ISO 10303-21:2002).

See Also

GetHeaderAuthor(); GetHeaderDescription(); GetHeaderName(); GetHeaderOrganization(); GetHeaderOriginatingSystem(); GetHeaderPreprocessorVersion(); GetHeaderSchema(); GetHeaderTimestamp()

GetHeaderName()

Function GetHeaderName() As String

The GetHeaderName() function returns the "Name" value found in the FILE_NAME portion of the STEP file header. This is a text name for the file. See GetHeaderSchema() for an example using all of the STEP header functions.

See Also

GetHeaderAuthor(); GetHeaderDescription(); GetHeaderImplementationLevel(); GetHeaderOrganization(); GetHeaderOriginatingSystem(); GetHeaderPreprocessorVersion(); GetHeaderSchema(); GetHeaderTimestamp()

GetHeaderOrganization()

Function GetHeaderOrganization() As List(Of String)

The GetHeaderOrganization() function returns the "Organization" value found in the FILE_NAME portion of the STEP file header. This is a list of strings that identifies the organization that created the file. See GetHeaderSchema() for an example using all of the STEP header functions.

See Also

GetHeaderAuthor(); GetHeaderDescription(); GetHeaderImplementationLevel(); GetHeaderName(); GetHeaderOriginatingSystem(); GetHeaderPreprocessorVersion(); GetHeaderSchema(); GetHeaderTimestamp()

GetHeaderOriginatingSystem()

Function GetHeaderOriginatingSystem() As String

The GetHeaderOriginatingSystem() function returns the "Originating_system" value found in the FILE_NAME portion of the STEP file header. This is the name of the system that was used to create the file. Typically, this is the name of a CAD system. See GetHeaderSchema() for an example using all of the STEP header functions.

See Also

GetHeaderAuthor(); GetHeaderDescription(); GetHeaderImplementationLevel(); GetHeaderName(); GetHeaderOrganization(); GetHeaderPreprocessorVersion(); GetHeaderSchema(); GetHeaderTimestamp()

GetHeaderPreprocessorVersion()

Function GetHeaderPreprocessorVersion() As String

The GetHeaderPreprocessorVersion() function returns the "Preprocessor_version" value found in the FILE_NAME portion of the STEP file header. This is additional version information about the system that was used to create the file. Typically it is used to give the version of the STEP file export utility of a CAD system. See GetHeaderSchema() for an example using all of the STEP header functions.

Return the "Preprocessor_version" value from the FILE_NAME entry in the STEP file header.

See Also

GetHeaderAuthor(); GetHeaderDescription(); GetHeaderImplementationLevel(); GetHeaderName(); GetHeaderOrganization(); GetHeaderOriginatingSystem(); GetHeaderSchema(); GetHeaderTimestamp()

GetHeaderSchema()

Function GetHeaderSchema() As String

The GetHeaderSchema function returns the name found in the FILE_SCHEMA portion of the STEP file header. This value identifies the STEP Application Protocol or other standard used to write the contents of the exchange file. Common schemas are "CONFIG_CONTROL_DESIGN" for AP203 and "AUTOMOTIVE_DESIGN" for AP214.

Example

The example below prints the schema name as well as all of the other information found in the STEP file header.

Dim cv As GeomView
Dim lst As List(Of String)

Console.WriteLine("Schema: {0}", cv.GetHeaderSchema())

Console.WriteLine("Timestamp: {0}", cv.GetHeaderTimestamp())
Console.WriteLine("Originating System: {0}", cv.GetHeaderOriginatingSystem())
Console.WriteLine("Preprocessor Version: {0}", cv.GetHeaderPreprocessorVersion())
Console.WriteLine("Implementation Level: {0}", cv.GetHeaderImplementationLevel())

Console.WriteLine("Name: {0}", cv.GetHeaderName())

lst = cv.GetHeaderDescription
Console.WriteLine("Description ----------")
For i As Integer = 0 To lst.Count - 1
    Console.WriteLine(lst(i))
Next

lst = cv.GetHeaderAuthor
Console.WriteLine("Author ----------")
For i As Integer = 0 To lst.Count - 1
    Console.WriteLine(lst(i))
Next

lst = cv.GetHeaderOrganization
Console.WriteLine("Organization ----------")
For i As Integer = 0 To lst.Count - 1
    Console.WriteLine(lst(i))
Next

See Also

GetHeaderAuthor(); GetHeaderDescription(); GetHeaderImplementationLevel(); GetHeaderName(); GetHeaderOrganization(); GetHeaderOriginatingSystem(); GetHeaderPreprocessorVersion(); GetHeaderTimestamp()

GetHeaderTimestamp()

Function GetHeaderTimestamp() As String

The GetHeaderTimestamp() function returns the "Time_stamp" value found in the FILE_NAME portion of the STEP file header. This is a string gives the date and time when the file was created. It may also give the time zone offset, but is not required to do so. See GetHeaderSchema() for an example using all of the STEP header functions.

See Also

GetHeaderAuthor(); GetHeaderDescription(); GetHeaderImplementationLevel(); GetHeaderName(); GetHeaderOrganization(); GetHeaderOriginatingSystem(); GetHeaderPreprocessorVersion(); GetHeaderSchema()

GetInstanceDescAtt()

Function GetInstanceDescAtt(
	ByVal eid As Long
	) As String

The GetInstanceDescAtt() function returns the "Description" field, if one exists, of any STEP instance. If the field does not exist the function will return String.Empty.

See Also

GetInstanceIdAtt(); GetInstanceNameAtt()

GetInstanceIdAtt()

Function GetInstanceIdAtt(
	ByVal eid As Long
	) As String

The GetInstanceIdAtt() function returns the "Id" field, if one exists, of any STEP instance. If the field does not exist the function will return String.Empty.

See Also

GetInstanceDescAtt(); GetInstanceNameAtt()

GetInstanceNameAtt()

Function GetInstanceNameAtt(
	ByVal eid As Long
	) As String

The GetInstanceNameAtt() function returns the "Name" field, if one exists, of any STEP instance. If the field does not exist the function will return String.Empty.

See Also

GetInstanceDescAtt(); GetInstanceIdAtt()

GetInstanceType()

Function GetInstanceType(
	ByVal eid As Long
	) As String

The GetInstanceType() function returns the entity name of a STEP instance. The name will be in all uppercase as seen in the STEP file. Names for complex instances will be concatenated from the leaf types.

Example

The following example prints the type of an object.

Dim cv As GeomView
Dim eid As Long

Console.WriteLine("#{0} is an instance of {1}", eid, cv.GetInstanceType(eid))

GetProductBaseID()

Function GetProductBaseID(
	ByVal eid As Long
	) As Long

The GetProductBaseID() function returns the STEP file ID of the STEP product instance associated with a product definition.

STEP product information is split across three different objects. An instance of PRODUCT DEFINITION is used to attach shape and assembly structure, and is the instance is used by most functions. An instance of PRODUCT DEFINITION FORMATION gives the version, while an instance of the PRODUCT entity gives the name.

Example

The example below prints some basic product structure information.

Dim cv As GeomView
Dim def_id As Long
Dim pdf_id As Long = cv.GetProductFormationID(def_id)
Dim p_id As Long = cv.GetProductBaseID(def_id)

Console.WriteLine("#{0} product definition instance", def_id)
Console.WriteLine("#{0} formation instance", pdf_id)
Console.WriteLine("#{0} product instance", p_id)

See Also

GetProductFormationID()

GetProductFormationID()

Function GetProductFormationID(
	ByVal eid As Long
	) As Long

The GetProductFormationID() function returns the STEP file ID of the STEP product definition formation instance associated with a product definition. See GetProductBaseID() for examples and some discussion of STEP product structure.

See Also

GetProductBaseID()

GetProductIdentifier()

Function GetProductIdentifier(
	ByVal eid As Long
	) As String

The GetProductIdentifier() function returns the "Id" field of the STEP product instance associated with a product definition. This is a convenience function that combines the GetProductBaseID() and GetInstanceIdAtt() functions.

Example

The following two code fragments produce the same results.

Dim cv As GeomView
Dim def_id As Long
Console.WriteLine("product ident: {0} ", GetProductIdentifier(def_id))
Console.WriteLine("product name: {0} ", GetProductName(def_id))


Dim p_id As Long = cv.GetProductBaseID(def_id)
Console.WriteLine("product ident: {0} ", GetInstanceIdAtt(p_id))
Console.WriteLine("product name: {0} ", GetInstanceNameAtt(p_id))

See Also

GetInstanceIdAtt(); GetProductBaseID(); GetProductName()

GetProductName()

Function GetProductName(
	ByVal eid As Long
	) As String

The GetProductIdentifier() function returns the "Name" field of the STEP product instance associated with a product definition. This is a convenience function that combines the GetProductBaseID() and GetInstanceNameAtt() functions.

See Also

GetInstanceNameAtt(); GetProductBaseID(); GetProductIdentifier()

GetProductRelFromShapeRel()

Function GetProductRelFromShapeRel(
	ByVal rel_id As Long
	) As Long

The GetProductRelFromShapeRel() function returns the assembly component relationship associated with a given shape relationship. STEP assemblies typically have two parallel trees of relationships. The assembly component relationships relate product instances into the bill-of-material structure. Shape relationships relate the geometry for assembly components and apply transforms to arrange them properly in space. Other shape relationships may exist that are not connected to the assembly structure. In that case, this function will return zero.

GetProductRels()

Function GetProductRels(
	ByVal pdef_id As Long
	) As List(Of Long)

The GetProductRels() function returns a list of assembly component relationship IDs for all children of a product definition. Use GetRelChildProduct() to get the child product definition instance from the relationship.

Example

The following example prints the components of an assembly.

Dim cv As GeomView
Dim pdef_id As Long

Dim rels As List(Of Long) = ctlView.GetProductRels(pdef_id)
For Each rel_id As Long In rels
    Dim child As Long = cv.GetRelChildProduct(rel_id)
    Console.WriteLine("child: {0} ", cv.GetProductIdentifier(child))
Next

See Also

GetRelChildProduct()

GetProductRoots()

Function GetProductRoots() As List(Of Long)

The GetProductRoots() function returns a list of IDs containing all of the root product definitions. These are the top-level products that do not appear as a component of any other product. To traverse all assemblies in a file, you would typically start with these, and then work your way down through the sub-components using the GetProductRels() function.

GetProductShapes()

Function GetProductShapes(
	ByVal pdef_id As Long
	) As List(Of Long)

The GetProductShapes() function returns a list of IDs for all shape representations of a given product definition. Typically, there is just one shape, but some products may contain alternate shape types.

GetRelChildProduct()

Function GetRelChildProduct(
	ByVal rel_id As Long
	) As Long

The GetRelChildProduct() function returns the child product definition of an assembly component relationship. Refer to the GetProductRels() function for more information and an example.

See Also

GetProductRels()

GetRelChildShape()

Function GetRelChildShape(
	ByVal rel_id As Long
	) As Long

The GetRelChildShape() function returns the child shape representation of a shape representation relationship. Refer to the GetShapeRels() function for more information and an example.

See Also

GetShapeRels()

GetShapeRels()

Function GetShapeRels(
	ByVal shape_id As Long
	) As List(Of Long)

The GetProductRels() function returns a list of shape representation relationship IDs for all children of a shape representation. Use GetRelChildShape() to get the child shape representation instance from the relationship.

Note that STEP models sometimes contain shape relationships that are separate from an assembly tree. For example, some systems associate a product with an empty, generic shape, and then associate that shape with another more specific one that contains the geometry instances.

Example

The following example prints the components of an assembly.

Dim cv As GeomView
Dim shape_id As Long

Dim rels As List(Of Long) = ctlView.GetShapeRels(shape_id)
For Each rel_id As Long In rels
    Dim child As Long = cv.GetRelChildShape(rel_id)
    Console.WriteLine("child shape #{0} ", child)
Next

See Also

GetRelChildShape()

GetShapeRoots()

Function GetShapeRoots() As List(Of Long)

The GetShapeRoots() function returns a list of IDs containing all shape representations that are not referenced by a product definition. Typically this will be empty, but some files may have shape representations referred to by things other than products.

GetView()

Sub GetView(
	ByRef ctr_x As Double,
	ByRef ctr_y As Double,
	ByRef ctr_z As Double,
	ByRef xax_i As Double,
	ByRef xax_j As Double,
	ByRef xax_k As Double, 
	ByRef yax_i As Double,
	ByRef yax_j As Double, 
	ByRef yax_k As Double, 
	ByRef zoom As Double
	)

The GetView() function return the current view center coordinates, X and Y direction vectors, and zoom factor. The first three parameters, ctr_x, ctr_y, and ctr_z return the XYZ cartesian coordinates of the view center point. The second three parameters, xax_i, xax_j, and xax_k return the IJK vector components of the transformed X axis. The third three parameters, yax_i, yax_j, and yax_k return the IJK vector components of the transformed Y axis. You can find the Z axis vector from the cross-product of the X and Y vectors. The final parameter will contain the current zoom factor.

You can restore a given view by passing these parameters back to the SetView() function.

Example

The following example prints out the current view parameters

Dim cv As GeomView
Dim x, y, z, xi, xj, xk, yi, yj, yk, zoom As Double

cv.GetView(x, y, z, xi, xj, xk, yi, yj, yk, zoom)

Console.WriteLine("CTR=({0},{1},{2})", x, y, z)
Console.WriteLine("XDIR=({0},{1},{2})", xi, xj, xk)
Console.WriteLine("YDIR=({0},{1},{2})", yi, yj, yk)
Console.WriteLine("ZOOM={0}", zoom)

See Also

SetView()

HideSelected()

Sub HideSelected()

The HideSelected() function hides that shape, face, or edge that is selected in the geometry window.

See Also

VisibleInstance()

IsSceneGraph()

Function IsSceneGraph(
	ByVal eid As Long
	) As Boolean

The IsSceneGraph() function returns true if the instance is part of the scenegraph. If false, then trying to set visibility, color, and other display functions will have no effect.

IsTransparent()

Function IsTransparent(
	ByVal eid As Long
	) As Boolean

The IsTransparent() function returns true if the instance has been explicitly made transparent by calling TransparentInstance(). This function will not indicate whether the shape inherits transparency from an enclosing assembly.

See Also

TransparentAllDefault(); TransparentDefault(); TransparentInstance(); TransparentSelected()

IsVisible()

Function IsVisible(
	ByVal eid As Long
	) As Boolean

The IsVisible() function returns true if the instance has not been hidden by calling VisibleInstance() with false. This function will not indicate whether the object is part of an enclosing shape or assembly that is hidden.

See Also

HideSelected(); VisibleAll(); VisibleAllChildren(); VisibleInstance()

IsVisibleAllAnnotations()

Function IsVisibleAllAnnotations() As Boolean

The IsVisibleAllAnnotations() function returns true if STEP presentation tolerances and other annotations will be shown.

See Also

VisibleAllAnnotations(); VisibleAnnotations()

LoadSTEPFile()

Sub LoadSTEPFile(
	ByVal filename As String
	)

The LoadSTEPFile() function will read a STEP file into memory and display all geometric contents in the form window. If the STEP file can not be loaded, the function throws an exception of type System.Exception.

Example

The following example loads a file.

Dim cv As GeomView

Try
   cv.LoadSTEPFile("C:\foo\bar.stp")
Catch ex As Exception
   Console.WriteLine("Error Reading File")
End Try

MakeProductPoint()

Sub MakeProductPoint(
	ByVal eid As Long, 
	ByVal productid As Long, 
	ByVal x As Double, 
 	ByVal y As Double, 
	ByVal z As Double,
	ByVal rgb As Integer
	)

The MakeProductPoint() function creates an annotation point with given coordinates and color. The point will be drawin as a circle of fixed radius on the screen. The ID fields allow you to associate it with a product instance and give it an ID.

MouseMode Property

Property MouseMode As MouseModeValue

Enum MouseModeValue
	Rotate
	Pan
	PickSolid
	PickShape
	PickFace
	PickEdge
End Enum

The MouseModeValue property controls the behavior of the mouse in the geometry window. Depending on the value it is given, the mouse will rotate the display, pan the window, or select one of several types of geometry objects.

Example

Dim cv As GeomView

'' rotate the display
cv.MouseMode = GeomView.MouseModeValue.Rotate

'' pan the display
cv.MouseMode = GeomView.MouseModeValue.Pan

'' select edges
cv.MouseMode = GeomView.MouseModeValue.PickEdge

'' select geometric faces
cv.MouseMode = GeomView.MouseModeValue.PickFace

'' select entire shape representations
cv.MouseMode = GeomView.MouseModeValue.PickShape

'' select individual solids within shape representations
cv.MouseMode = GeomView.MouseModeValue.PickSolid

Perspective Property

Property Perspective As Boolean

The Perspective property displays geometry using a perspective transformation if true, and an orthographic projection if false.

With a perspective transformation, lines appear to converge in the distance while with an orthographic transformation they do not. An orthographic drawing style is useful for comparing the size of objects at different distances.

Reset()

Sub Reset()

The Reset() function clears the display and the current STEP file.

SetView()

Sub SetView(
	ByVal ctr_x As Double,
	ByVal ctr_y As Double,
	ByVal ctr_z As Double,
	ByVal xax_i As Double,
	ByVal xax_j As Double,
	ByVal xax_k As Double, 
	ByVal yax_i As Double,
	ByVal yax_j As Double, 
	ByVal yax_k As Double, 
	ByVal zoom As Double
	)

The SetView() function changes the orientation of the geometry window contents. Use this function to restore an orientation saved with the GetView function or display standard views such as top, botom, or isometric.

The function takes the desired view center coordinates, X and Y direction vectors, and zoom factor. The first three parameters, ctr_x, ctr_y, and ctr_z are the XYZ cartesian coordinates of the desired view center point. The second three parameters, xax_i, xax_j, and xax_k return the IJK vector components of the desired transformed X axis. The third three parameters, yax_i, yax_j, and yax_k return the IJK vector components of the desired transformed Y axis. The final parameter is the desired zoom factor.

Example

The following example sets the view to a few different standard orientations while keeping the same zoom factor.

Dim cv As GeomView
Dim sz As Double = ctlView.Zoom

'' An Isometric view
Dim rt2 As Double = System.Math.Sqrt(2)
Dim rt3 As Double = System.Math.Sqrt(3)
Dim rt6 As Double = System.Math.Sqrt(6)

cv.SetView(0, 0, 0, -rt3/rt6, -1/rt6, rt2/rt6, rt3/rt6, -1/rt6, rt2/rt6, sz)


'' A front view, along the X axis
cv.SetView(0, 0, 0, 0, 0, 1, 1, 0, 0, sz)

'' A top view, down the Z axis
cv.SetView(0, 0, 0, 1, 0, 0, 0, 1, 0, sz)

See Also

GetView()

TransparentAllDefault()

Sub TransparentAllDefault()

The TransparentAllDefault() function restores all shape and face instance everything to the default solid state.

See Also

IsTransparent(); TransparentDefault(); TransparentInstance(); TransparentSelected()

TransparentDefault()

Sub TransparentDefault(
	ByVal eid As Long, 
	ByVal recursive As Boolean
	)

The TransparentDefault() function restores a given shape or face instance to the default transparency state. The default is to draw the item using the transparency of of its scenegraph parent, or solid if it is a root item. If the recursive parameter is true, the function also restores all scenegraph children of the instance.

See Also

IsTransparent(); TransparentAllDefault(); TransparentInstance(); TransparentSelected()

TransparentInstance()

Sub TransparentInstance(
	ByVal eid As Long, 
	ByVal display As Boolean
	)

The TransparentInstance() function sets the transparency of a given instance to be explicitly on or off.

See Also

IsTransparent(); TransparentAllDefault(); TransparentDefault(); TransparentSelected()

TransparentSelected()

Sub TransparentSelected()

The TransparentSelected() function makes transparent the shape or face that is selected in the geometry window.

See Also

IsTransparent(); TransparentAllDefault(); TransparentDefault(); TransparentInstance()

VisibleAll()

Sub VisibleAll()

The VisibleAll() function shows all products and shapes in the geometry window. All products and shapes are shown automatically when a STEP file is read using LoadSTEPFile().

See Also

HideSelected(); IsVisible(); VisibleAllChildren(); VisibleInstance()

VisibleAllAnnotations()

Sub VisibleAllAnnotations(
	Boolean display
	)

The VisibleAllAnnotations() function shows or hides all STEP presentation tolerances and other annotations in the geometry window. If the display argument is true, annotations will be shown. If false, they will be hidden. By default, all annotations are shown.

See Also

IsVisibleAllAnnotations(); VisibleAnnotations()

VisibleAllChildren()

Sub VisibleAllChildren(
	ByVal eid As Long, 
	ByVal display As Boolean
	)

The VisibleAllChildren() function shows or hides an instance as well as any assembly/shape children in the scenegraph. A display value of true means show, while false means hide.

See Also

HideSelected(); IsVisible(); VisibleAll(); VisibleInstance()

VisibleAnnotations()

Sub VisibleAnnotations(
	ByVal eid As Long, 
	ByVal display As Boolean
	)

The VisibleAnnotations() function shows or hides STEP presentation tolerances and other annotations associated with an instance.

See Also

IsVisibleAllAnnotations(); VisibleAllAnnotations()

VisibleInstance()

Sub VisibleInstance(
	ByVal eid As Long, 
	ByVal display As Boolean
	)

The VisibleInstance() function shows or hides an instance. Any assembly/shape children are unchanged. A display value of true means show, while false means hide.

See Also

HideSelected(); IsVisible(); VisibleAll(); VisibleAllChildren(); VisibleInstance()

Zoom Property

Property Zoom As Double

The Zoom property gets or sets the current zoom factor. A value of 1 is guaranteed to show the complete bounding box of all shapes.

Example

The following example shows some zoom changing operations.

Dim cv As GeomView

'' Fit everything in the view window
cv.ZoomAll()

'' Zoom out, make the image 80% of previous size
cv.Zoom = cv.Zoom * 0.8

'' Zoom in, make the image 120% of previous size
cv.Zoom = cv.Zoom * 1.2

See Also

ZoomAll()

ZoomAll()

Sub ZoomAll()

The ZoomAll() function sets zoom factor so that all shapes are visible.

See Also

Zoom Property