Table of Contents

SpinFirePro Plug-In SDK
Reference Manual

Last Updated: 21 April 2006

  • Disclaimer
  • Introduction
  • SpinFirePro Object Model
  • IDTExtensibility2 Interface
  • Plug-in Registration
  • Building a Plug-In Using Visual C# .NET
  • Creating CommandBar Buttons and Popups
  • Creating SpinFire Professional Extension Components
  • Actify.SpinFirePro Objects
    • Application
    • CommandBar
    • CommandBars collection
    • CommandBarButton
    • CommandBarControl
    • CommandBarControls collection
    • CommandBarPopup
    • Component
    • Components collection
    • Document
    • Documents collection
    • Workspace
  • 3D Viewer Objects
    • Actify.XView3D
    • SF_Node
    • SF_Point
    • SF_Vector
    • Markup Note
    • Markup Note2D
    • Markup Vertex
    • Markup Distance
    • Markup 3PtAngle
    • Markup 3PtCircle
    • Markup BoundBox
    • Markup MassProperties
    • Markup 2PtDraftAngle
    • SF_ReferenceFrames
    • SF_ReferenceFrame
    • SF_FreeEdge
    • SF_XViewPrintOptions
  • 2D Viewer Objects
    • Actify.DXView
    • DxDocPage
    • DxDocPages collection
    • DxDrawings collection
    • DxLineMarkup
    • DxMarkups collection
    • DxMeasurementMarkup
    • DxShapeMarkup
    • DxTextMarkup
    • SF_Attribute
    • SF_Attributes
    • SF_BoundingBox2D
    • SF_Layers collection
    • SF_Layer
    • SF_Paperspace
    • SF_Transform


Disclaimer

The SpinFire system is constantly being improved and revised by Actify. Therefore, if you encounter any errors in this documentation, it is possible that the said technique has been improved and revised. Contact Actify for the latest improvements and revisions of any SpinFire component. Except as expressly provided otherwise in an agreement between you and Actify, all information, software, and documentation is provided "as is" without warranty of any kind. In no event will Actify be liable for any special, indirect, or consequential damages, or any damages whatsoever resulting from the loss of use, data or profits, whether in an action for breach of contract or warranty or tort (including negligence) arising out of or in connection with the information, technology, software and documentation. You assume all risks concerning the suitability and accuracy of Actify information. The web site and publications may contain technical inaccuracies or typographical errors. Actify assumes no responsibility for and disclaims all liability for any such inaccuracy, error, or omission in the web site and documentation and in any other referenced or linked documentation. Actify may make changes to the information, software, web site, documentation, prices, technical specifications, and product offerings at any time and without notice.


Introduction

SpinFire Professional plug-ins provide third-party developers with a way to extend the functionality of SpinFire Professional for custom tasks. Plug-ins can be used to automate SpinFire Professional in response to a click of a command bar button and other events such as opening or closing documents or picking a node in the 3D viewer.

A SpinFire Professional plug-in is an in-process COM object (an ActiveX DLL) that is loaded when SpinFire Professional runs. SpinFire Professional provides a rich API of 30+ objects and 300+ methods and events for the developer. The API allows for customization of the user interface, creating custom components, and accessing the graphics. The entire SpinFire Professional API is accessible by the plug-in.

In addition to normal COM registration, plug-ins must create keys in the system registry for SpinFire Professional. These keys provide SpinFire Professional the information to create the plug-in as a COM object.

The Microsoft Office interface IDTExtensibility2 is the API interface between SpinFire Professional and a plug-in. Plug-ins must implement minimally implement the IDTExtensibility2::OnConnection method. The other four methods of IDTExtensibility2 are optional, depending on the needs of the plug-in.

SpinFire Professional plug-ins can be written in any number of languages such as C++ or C#. The only restriction to the language used to implement the plug-in is that it must support Microsoft COM interfaces. However, for future compatibility, Actify recommends writing the plug-in in managed code.

SpinFire Professional exposes the toolbar and menu bar with APIs. This allows developers to add additional functionality to the application by connecting them with a custom menu command or toolbar button. The menu and toolbars have a similar programming model, called a "command bar".

Each command bar contains a collection of controls. A new command bar control is created by adding an item to the collection. Custom command bar controls can contain icons, caption text, and tooltip text.

SpinFire Professional has four basic components - Home, Library, Options, and Viewer. SpinFire Professional plug-ins will be able to add additional components to the set.

The SpinFire Professional user-interface allows a single component to be active at a time. Custom components can be activated by the user from a button on the side component bar in the user interface.

When a component is activated, it will receive a OnComponentActivate event.

Custom components can be enhanced by including SpinFire 3D and 2D viewer windows in the user-interface. If the Workspace3D contains multiple documents, each document can appear simultaneously in the interface. The custom component displays the viewer by providing a "host" window.


Actify.SpinFirePro Object Model

The following diagram depicts the objects and collections in the SpinFirePro object model.


IDTExtensibility2

A SpinFire Professional plug-in is an in-process COM server, or ActiveX dynamic link library (DLL), that implements the IDTExensibility2 interface as described in the Microsoft Add-in Designer type library (Msaddndr.dll). IDTExtensibility2 is the same interface used by Microsoft Office and Visual Studio for COM Add-ins.

IDTExtensibility2 provides five methods that act as events within SpinFire Professional. This interface is implemented by the plug-in. The methods allow the plug-in to respond connection and shut-down events in SpinFire Professional.

All plug-ins inherit from this interface and must implement the IDTExtensibility2::OnConnection method. The other four methods of IDTExtensibility2 are optional, depending on the needs of the plug-in.

OnConnection

The OnConnection method fires whenever the plug-in is connected and it is the main entry point from SpinFire Professional into the plug-in. SpinFire Professional always loads plug-ins on startup, and this method is called by SpinFire Professional immediately after the plug-in is loaded. If OnConnection returns successfully, the plug-in is said to be loaded, and OnConnection provides the plug-in with an instance of the main SpinFire Professional application through the Actify.SpinFirePro.Application object. If an error message is returned, SpinFire Professional releases its reference to the plug-in and the object is destroyed.

OnConnection takes the following four parameters:

  • Application - A reference to the SpinFire Professional application object.
  • ConnectMode - A constant that specifies how the plug-in is connected.
    • ext_cm_AfterStartup - The plug-in is started by the end user after the application has started. Not supported by SpinFire Professional.
    • ext_cm_CommandLine - The plug-in is connected from the command line. Not supported by SpinFire Professional.
    • ext_cm_External - The plug-in is connected by an external application through Automation. Not supported by SpinFire Professional.
    • ext_cm_Startup - The plug-in is started by the host at application startup. This is the only mode supported by SpinFire Professional.
  • AddInInst - A reference to the COMAddIn object that refers to this plug-in in the COMAddIns collection for the host application.
  • Custom - An array of Variant type values that can hold user-defined data.

See also Microsoft's documentation for OnConnection.

OnDisconnection

The OnDisconnection method fires when the plug-in is disconnected and just before it unloads from memory. The plug-in should perform any cleanup of resources in this event, and restore any changes made to SpinFire Professional.

OnDisconnection takes the following two parameters:

  • RemoveMode - A constant that specifies how the plug-in was disconnected. The plug-in can be disconnected in the following ways:
    • ext_dm_HostShutdown - The plug-in is disconnected when the host application closed. This is the only mode supported by SpinFire Professional.
    • ext_dm_UserClosed - The plug-in is disconnected by the end user or an Automation controller. Not supported by SpinFire Professional.
  • Custom - An array of Variant type values that can hold user-defined data.

See also Microsoft's documentation for OnDisconnection.

OnStartupComplete and OnBeginShutdown

Both the OnStartupComplete and OnBeginShutdown methods are called when SpinFire Professional has left or is entering a state in which user interaction should be avoided because the application is busy loading or unloading itself from memory. OnStartupComplete is called only if the plug-in was connected during startup, and OnBeginShutdown is called only if SpinFire Professional disconnects the plug-in during shutdown.

Because the user interface for the host application is fully active when these events fire, they may be the only way to perform certain actions that otherwise would be unavailable from OnConnection and OnDisconnection.

See also Microsoft's documentation for OnStartupComplete and OnBeginShutdown

OnAddInsUpdate

The OnAddInsUpdate method fires when the set of registered plug-ins changes.


Plug-in Registration

In addition to normal COM registration, a plug-in needs to register itself with SpinFire Professional. To register itself with a particular application, the plug-in should create a subkey, using its ProgID as the name for the key, under the following location:
HKEY_LOCAL_MACHINE\Software\Actify\Extensions\SpinFire Professional\Addins\ProgID

The plug-in can provide values at this key location for both a friendly display name (FriendlyName) and a full description (Description). In addition, the plug-in should specify its desired load behavior by using a DWORD value called LoadBehavior. This value determines how the plug-in is loaded by the host application, and is made up of a combination of the following values:

  • 0 = Disconnect - Is not loaded.
  • 1 = Connected - Is loaded.
  • 2 = Bootload - Load on application startup.
  • 8 = DemandLoad - Load only when requested by user.
  • 16 = ConnectFirstTime - Load only once (on next startup).

At present, SpinFire Professional supports only loading on application startup. Therefore the value for this key should be 0x03 (Connected | Bootload).


Building a Plug-In Using Visual C# .NET

A SpinFire Professional plug-in is an in-process COM server that is activated by the application through the COM run-time layer. Therefore, developing a COM add-in in .NET requires that the plug-in component be implemented in .NET and then exposed to the COM clients (that is, SpinFire Professional) through the COM interop layer.

To create a SpinFire Professional plug-in in Visual C# .NET, follow these steps:

  1. In Visual C# .NET, create a Class Library project.
  2. Add a reference to the type library that implements IDTExtensibility2. The primary interop assembly for this is already available under the name Extensibility.
  3. Add a reference to the SpinFire Professional object library. The primary interop assembly for SpinFire Professional is installed in the same directory as SpinFire Professional, typically C:\Program Files\Actify\Kernel\Actify.SpinFirePro.Interop.dll. You may also need to add additional primary interop assemblies, Actify.XView3D.Interop.dll and Actify.DXView.Interop.dll if your plug-in accesses the 3D viewer or 2D viewer components.

    Important: Always use primary interop assemblies. Do not directly reference the SpinFire.exe file or the SpinFire Professional COM Type Library which may cause incompatibilities with future versions of SpinFire Professional and other plug-ins.

  4. Create a public class in the class library that implements IDTExtensibility2.
  5. After the class library is built, register the library for COM interop. To do this, generate a strong named assembly for this class library and then register it with COM interop. You can use Regasm.exe to register a .NET component for COM interop.
  6. Create registry entries so that SpinFire Professional can recognize and load the plug-in.

Step-by-Step Example

You can choose to complete all of these steps, or you can create a .NET project of type Shared Addin. This starts the Extensibility Wizard, which helps you to create a COM add-in in .NET.

The Extensibility Wizard creates a Visual C# .NET class library project along with a Connect class that implements the IDTExtensibility2 interface. The skeleton code that implements the empty members of IDTExtensibility is also generated. This project has references to Extensibility and Office assemblies. The build settings of the project have Register for COM Interop selected.

Along with the class library project, the wizard generates a setup project that you can use to deploy the COM add-in on other computers.

  1. On the File menu in Microsoft Visual Studio .NET, click New, and then click Project.
  2. In the New Project dialog box, expand Other Projects under Project Types, select Extensibility Projects, and then select the Shared Add-in template.
  3. Type MySFPROPlugin as the name of the plug-in and then click OK.
  4. When the Extensibility Wizard appears, follow these steps:
    1. On page 1, select Create an Add-in using Visual C#, and then click Next.
    2. On page 2, select Microsoft Word as the host application, and then click Next.

      The Add-in Wizard does not support SpinFire Professional. We will initially create a Microsoft Word Add-in and modify it for SpinFire Professional.
    3. On page 3, provide a name and description for the plug-in, and then click Next.

      Note: The name and the description of the plug-in appear in the About dialog box in the SpinFire Professional.
    4. On page 4, select all of the available options, and then click Next.
    5. Click Finish.
  5. On the Project menu, click Add Reference. Click System.Windows.Forms.DLL in the components list, click Select, and then click OK.
  6. Add the following to the list of namespaces in the Connect class:

    using System.Windows.Forms;

  7. On the Project menu, click Add Reference. Select the Browse... button and choose the Actify.SpinFirePro.Interop.dll file in the directory where SpinFire Professional is installed, and then click OK to close the Add Reference dialog.
  8. Repeat Step 7, and add Actify.XView3D.Interop.dll.
  9. Add the following member to the Connect class:

    private Actify.SpinFirePro.Application spinfireProApp;

  10. Remove the Reference to Microsoft Office. In the Solution Explorer, open the References folder and remove the reference to Office, which was generated by the project wizard, but not required by SpinFire Professional plug-ins.

  11. Remove the following line from the Connect class:

    using Microsoft.Office.Core;

  12. Implement the code for the members of IDTExtensibility2 in the Connect class, as follows:

                    public void OnConnection(object application, Extensibility.ext_ConnectMode
                connectMode, object addInInst, ref System.Array custom)
{
spinfireProApp = application as Actify.SpinFirePro.Application;
}

public void OnDisconnection(Extensibility.ext_DisconnectMode disconnectMode,
                ref System.Array custom)
{
spinfireProApp = null;
}

public void OnAddInsUpdate(ref System.Array custom)
{
}

public void OnStartupComplete(ref System.Array custom)
{
MessageBox.Show("My SFPRO Plug-in started.");
}

public void OnBeginShutdown(ref System.Array custom)
{
}

private Actify.SpinFirePro.Application spinfireProApp;

That's the basic code needed to create the plug-in. Now let's change the plug-in's setup project to register it with SpinFire Professional.

  1. Select the MySFPROPluginSetup project in the Visual Studio Solution Explorer window.
  2. Update the installation dependencies for the installation project. Right-mouse on the Detected Dependencies folder in the Setup project and select Reference Dependencies.

    This will remove the Office.dll from the installation, and add Actify.SpinFirePro.Interop.dll and Actify.XView3D.Interop.dll.
  3. Click on the Registry Editor button in the Solution Explorer toolbar.

  4. Remove the registry key for Microsoft Word and replace it with the registration for SpinFire Professional. HKEY_LOCAL_MACHINE\Software\Actify\Extensions\SpinFire Professional\Addins\MySFPROPlugin.Connect. The key should have string values for Description and FriendlyName. The DWORD value for LoadBehavior should be 3.

  5. Build the solution including the MySFPROPlugin project and the MySFPROPluginSetup project. To do this, follow these steps:
    1. On the Build menu, click Build Solution. Note that building the plug-in registers the .NET class with the COM interop.
    2. Right-click on the MySFPROPluginSetup project in the Solution Explorer and select Install.
    3. Follow the steps of the installation program and the plug-in will be registered with SpinFire Professional.
  6. Run SpinFire Professional and you should see the message box when you plug-in starts up.

The next steps will modify the project to create a more interesting plug-in. We'll create a SpinFire Professional toolbar button as well as access the 3D viewer object model.

  1. Change the OnStartupComplete method to create a toolbar button and add a couple of event handlers.

                        public void OnStartupComplete(ref System.Array custom)
{
CreateButton();
HookEvents();

isPicking = false;
}

private void CreateButton()
{
button1ID = spinfireProApp.GetUniqueCommandBarID();

// Add button to main toolbar
Actify.SpinFirePro.SFCommandBar toolbar =
                    spinfireProApp.CommandBars[2];
Actify.SpinFirePro.SFCommandBarControls toolbarControls =
                    toolbar.Controls;

Actify.SpinFirePro.SFCommandBarButton button =
                    (Actify.SpinFirePro.SFCommandBarButton)
                    toolbarControls.Add(Actify.SpinFirePro.SFControlType.sfControlTypeButton,
                    button1ID, "Button 1", -1);
}

private void HookEvents()
{
spinfireProApp.CommandBarExecute += new
                    Actify.SpinFirePro._ISFApplicationEvents_CommandBarExecuteEventHandler(spinfireProApp_CommandBarExecute);
spinfireProApp.ItemPick += new
                    Actify.SpinFirePro._ISFApplicationEvents_ItemPickEventHandler(spinfireProApp_ItemPick);
}

private void spinfireProApp_CommandBarExecute(int ctrlID)
{
if (ctrlID == button1ID)
{
Actify.SpinFirePro.ISFReaderDocuments documents =
                    spinfireProApp.Workspace.Documents;

// Get the first document
Actify.SpinFirePro.ISFReaderDocument document =
                    documents[1];
xview = document.GetViewerObject() as
                    Actify.XView3D.XView;

// Go into parts picking mode
xview.PickingType("PARTS");
isPicking = true;
}
}

private void spinfireProApp_ItemPick(Actify.SpinFirePro.SFProItemType item,
                    string itemID)
{
if (isPicking)
{
Actify.XView3D.ISF_Node node = xview.PickGetNode() as
                    Actify.XView3D.ISF_Node;
node.Translate(100, 100, 0);

xview.PickingType("None");
xview.Refresh();

isPicking = false;
}
}

private Actify.XView3D.XView xview;
private bool isPicking;
private long button1ID;

  2. Build the solution and run SpinFire Professional.
  3. Open a file that has a 3D document in SpinFire Professional.
  4. Click on the "Press Me" toolbar button.
  5. Click on a part in the 3D viewer window.
  6. The part will translate 100, 100 in the x-y plane.


How to Create CommandBar Buttons and Popups using the SpinFire Professional API

The CommandBar Objects

The Actify SpinFire Professional CommandBar objects are based on the Microsoft Office object model. If you are familiar with programming Microsoft Office, then the Actify API should be immediately recognizable.

The CommandBars Collection

The CommandBars collection object is a property of the Actify.SpinFirePro.Application object. This collection contains two CommandBar objects, the main menu and the application's toolbar.

Access the menu and toolbar using an index into the collection:

CommandBar menubar = spinfireproApp.CommandBars[1];
CommandBar toolbar = spinfireproApp.CommandBars[2];

The first item in the collection is SpinFire Professional's main menu and the second item is the main toolbar.

The CommandBarControls Collection

Use the CommandBar.Controls property to return the CommandBarControls collection.The following example copies the caption of every control on the toolbar to an array.

foreach (ctrl in spinfireproApp.CommandBars[2].Controls)
{
captions[i++] = ctrl.Caption;
}

Use Controls[index], where index is the index number of a control, to return a CommandBarControl object. The following code gets the caption of the third button in the toolbar.

myCtrl = spinfireproApp.CommandBars[2].Controls[1];
string caption = myBtn.Caption;

We will see later that the CommandBarControls collection is also used to get the controls in popup menus.

Adding a new CommandBarButton

Use the Add method to add a new command bar control to the CommandBarControls collection. This example adds a new button to the toolbar.

myCtrlId = spinfireProApp.GetUniqueCommandBarID();
myCtrl spinfireproApp.CommandBars[2].Controls.Add( SFControlType.sfControlTypeButton, myCtrlId, "My Button", -1);

Let us examine the parameters to Add:

  • SFControlType type

    The type of the control. This is either sfControlTypeButton or sfControlTypePopup.
  • int id

    A unique integer that identifies the control. Custom controls should use the Application.GetUniqueCommandBarID() method create an id.
  • string caption

    This is the text on the menu or popup.
  • int before

    A number that indicates the position of the new control on the command bar. The new control will be inserted before the control at the ID. Use -1 to add the control is to the end of the command bar.

To be useful, command buttons need take an action when clicked. This is done by hooking the CommandBarExecute application event.

spinfireApplication.CommandBarExecute += new _ISFApplicationEvents_CommandBarExecuteEventHandler(SFPro_CommandBarExecute);

The event handler receives the ID of the control that was clicked.

private void SFPro_CommandBarExecute(int id)
{
if (id == myCtrlId)
{
Message.Show(“My Button clicked”);
}
}

Adding a new CommandBarPopup

Use the Add method to add a new command bar popup to the CommandBarControls collection. This example adds a popup to the application's menu bar.

// Add menu
myCtrl = spinfireproApp.CommandBars[1].Controls.Add( SFControlType.sfControlTypePopup, menuId, "My Menu", -1);

Each popup menu has its own CommandBar. Menu items are CommandBarButtons in the popup's CommandBar. To add menu items to our control, we'll add them to the CommandBar.

// Cast from CommandBarControl to CommandBarPopup
CommandBarPopup myPopup1 = (Actify.SpinFirePro.CommandBarPopup) myCtrl;

myPopup.CommandBar.Controls.Add( SFControlType.sfControlTypeButton, menuItem1Id, "MenuItem 1", -1);
myPopup.CommandBar.Controls.Add( SFControlType.sfControlTypeButton, menuItem2Id, "MenuItem 2", -1);

Popup menus can have sub-menus. Sub-menus are created by adding CommandBarPopups to the menu's CommandBar. The example below adds a submenu with three items to the popup menu we've just created.

                // Add sub-menu
                myCtrl = myPopup.CommandBar.Controls.Add(
                SFControlType.sfControlTypeButton, menuItem3Id, "MenuItem 3", -1);

// Cast from CommandBarControl to CommandBarPopup
                CommandBarPopup mySubPopup = (Actify.SpinFirePro.CommandBarPopup) myCtrl;

mySubPopup.CommandBar.Controls.Add(
                SFControlType.sfControlTypeButton, menuItem4Id, "MenuItem 4", -1);
mySubPopup.CommandBar.Controls.Add(
                SFControlType.sfControlTypeButton, menuItem5Id, "MenuItem 5", -1);
mySubPopup.CommandBar.Controls.Add(
                SFControlType.sfControlTypeButton, menuItem6Id, "MenuItem 6", -1);

Adding Button Icons

Command bar buttons and menu items can optionally have icons next to the caption. There are two ways to set the icon. The simplest method is to set the CommandBarButton.Picture property to the path of an .ico or .bmp file.

// Cast from CommandBarControl to CommandBarButton
CommandBarButton myButton1 = (Actify.SpinFirePro.CommandBarBtton) myCtrl;

myButton1.Picture = "C:\\Program Files\\My Company\\My Plugin\\button1.bmp";

Adding Button Icons from Resource Files

Working with image files and managed code in current VisualStudio .NET 2003 difficult. However, after creating the first image to your program, additional images are trivial. VisualStudio .NET does not have a managed resource image editor. However, the Visual Studio .NET SDK has a sample called the Resource Editor, that, when built and run, allows you to add to a resource file more easily.

Note: The default location for the Resource Editor sample is the following:
C:\Program Files\Microsoft Visual Studio .NET 2003\ SDK\v1.1\Samples\Tutorials\resourcesandlocalization

You can use the Resource Editor application to add items to a resource file and then save the file. The following procedure shows you how to use the Resource Editor to add items to a resource file.

To add items to a resource file by using the Resource Editor:

  1. In the Resource Editor, in the Add section, select System.Drawing.Icon as the type of item to add to the resource file from the drop-down list. The solution includes two icons with .ico extensions.
  2. In the text box to the right of the Add section, type Icon1 as the name of the first item to add. This enables the Add button.
  3. Click Add.
  4. Type Icon2 as the name of second item to add and then click Add.
  5. Next, click File and then click Save As...
  6. Type IconResource.resX as the name for the project and browse to the parent directory of the sample add-in project.
  7. In the Save as type list, select ResX Files (*.resX) and then click Save to save the resource file
  8. Close the Resource Editor.

You have successfully created a resource file and added two icons to the resource file. The next step is to add the resource file to the add-in project.

The next procedure describes how to add the resource file to the project in Visual Studio .NET.

To add the resource file to the add-in project in Visual Studio .NET

  1. In Solution Explorer, right-click on the project and point to Add and then click Add Existing Item...
  2. Under Files of type, in the drop-down list, click All files (*.*), locate and click IconResource.resX, and then click Open.
  3. Once you add the resource file to the project, in Solution Explorer, double-click the file to display the data in the IDE using an XML or Data view. The XML view also includes the ASCII representation of the image files.

Accessing the Resource Files:

The procedure accesses the resource file by creating an instance of a ResourceManager class:

            System.Resources.ResourceManager rm = new System.Resources.ResourceManager(
                this.GetType().Namespace + ".IconResources",
                this.GetType().Assembly);

System.Drawing.Icon icon = (System.Drawing.Icon) rm.GetObject("icon1");

The System.Resources.ResourceManager class includes methods that allow you to extract its contents. When calling the constructor of the ResourceManager class you pass the name of the resource file as the base name. You use the name of the assembly followed by the name of the resource file without the file extension attribute. The second parameter is a reference to the executing assembly that contains the resource file.

Setting the Icon Resource:

The CommandBarButton object has two different methods to set the icon, CommandBarButton.Icon and CommandBarButton.Picture. The CommandBarButton.Icon method is convenient for development languages such as C++ that use the native Win32 resource HICON type, the latter method is convenient for Visual Basic 6 which support the IPictureDisp. However, either method can be used in most development languages.

Method #1 - Using CommandBarButton.Icon:

The System.Drawing.Icon object has a Handle method that is the Win32 HICON. This handle must be type casted to and int to set the CommandBarButton.Icon.

button.Icon = (int) icon.Handle;

Method #2 - Using CommandBarButton.Picture:

To use CommandBarButton.Picture, the icon will have to be converted to an IPictureDisp object. The System.Windows.Forms.AxHost class contains a static protected method that provides this functionality. To access it, create a utility class that inherits from AxHost.

// PictureConvert.cs

using System;
using System.Drawing;
using System.Windows.Forms;
using stdole;

public class PictureConvert : AxHost
{
public PictureConvert() : base(null) {}
public new static IPictureDisp
GetIPictureDispFromPicture(Image image)
{
return (IPictureDisp) AxHost.GetIPictureDispFromPicture(image);
}
}

Now, the final step is to set the CommandBarButton.Picture property to the IPictureDisp object.

System.Drawing.Bitmap bmp = (System.Drawing.Bitmap) icon.ToBitmap();
if (bmp != null)
{
stdole.IPictureDisp picture = PictureConvert.GetIPictureDispFromPicture(bmp);
button.Picture = picture;
}


Creating SpinFire Professional Extension Components

Note: This document assumes that you are familiar with writing SpinFire Professional Plug-ins. Please see Building a Plug-In Using Visual C# .NET for more information.

Extension Components

SpinFire Professional's main window has tab controls on the left-hand side that allow access to each module in the application. These modules are called SpinFire Professional components.

In addition to the four standard components, the Actify API allows for the creation of extension components. Extension components are created by SpinFire Professional plug-ins, and have their own tabs and windows like the standard components.

The Components Collection

The Components collection object is a property of the Actify.SpinFirePro.Application object. This collection contains at least four Component objects, the "Home", "Library", "Viewer", and "Options" components.

Access any of the components in the collection using an index or name:

Actify.SpinFirePro.Component compHome = spinfireproApp.Components[1];
Actify.SpinFirePro.Component compOptions = spinfireproApp.Components["Options"];

Adding a new Component

Extension components are typically created when the application starts. This can be done when the SpinFire Professional plug-in receives the OnStartupComplete event.

Use the Components.Add method to add a new component to the collection. This example creates an extension component called MyComponent and adds it to the list of components.

public void OnStartupComplete(ref System.Array custom)
{
CreateMyComponent();
}

private void CreateMyComponent()
{
myComponent = new MyComponent(spinfireProApp);
spinfireProApp.Components.Add(myComponent);
}

The ISFComponent Interface

The MyComponent class is an implementation of the Actify.SpinFirePro.ISFComponent interface. In C#, the class must inherit from the interface.

public class DingoScriptComponent : Actify.SpinFirePro.ISFComponent
{
...
};

MyComponent must then implement each of the methods in the interface.

Let us examine each of the methods:

  • void CreateComponentWindow(int hWndParent, out int hwndComponent);
    This method is called by SpinFire Professional to initialize the extension component. Each component exists inside a window, which must be created when this method is called. Given the parent window hWndParent, this method returns the created hwndComponent. They types of both parameters are Win32 HWNDs.
  • string GetName();
    GetName returns a string used to identify the component. It must not change during the lifetime of the component. The name can be used to access the component through the collection:

    • Actify.SpinFirePro.Component myComp = spinfireproApp.Components["MyComponent"];

  • string GetResourceDll();
    This method returns the path to a Win32 DLL that has resources for the component. SpinFire Professional will locate the name and icon of the component from this DLL. The resource IDs of each resource must be 1.

  • void ActivateWindow(bool activate);
    This method is called by whenever the component window is activated or deactivated. The extension component may choose to perform some tasks when it is notified of the window's activation.

Hosting Viewer Controls

Extension components may include 3D model and 2D drawing controls inside their windows. The Actify API allows components to take ownership of the viewer. This is accomplished by providing a viewer control with a new parent HWND in a call to Actify.SpinFirePro.HostDocumentViewer().

The HostDocumentViewer method should only be called when the component is the active window.

The code below is called when the component window becomes active. The component window contains a System.Wndows.Forms.PictureBox called pictureBox1, which was created when the component was initialized.

        public UserControl1 componentWindow;

public void ActivateWindow(bool activate)
{
if (activate)
{
Actify.SpinFirePro.ISFReaderDocuments documents =
              spinfireApplication.Workspace.Documents;

if (documents.Count > 0)
{
Actify.SpinFirePro.ISFReaderDocument document = documents[1];
if (document != null)
{
spinfireApplication.HostDocumentViewer(document.ID,
                               (int) componentWindow.pictureBox1.Handle);
}
}
}
}

The call to HostDocumentViewer makes pictureBox1 the parent window to the first document viewer control.


SpinFirePro.Application class

Represents the SpinFire Professional application. The Application object includes properties and methods that return top-level objects.

To use Automation to control SpinFire Professional from another application, you should instantiate a Actify.SpinFirePro.Application object. The following VisualBasic example starts SpinFire Professional and opens an existing document:

Set sfpro = CreateObject("SpinFirePro.Application")
sfpro.Visible = True
sfpro.Open("C:\My Documents\My.3D\Part.3D")


SpinFirePro.CommandBar class

A command bar displays controls such toolbar buttons and popup menus.

[ Properties ]


SpinFirePro.CommandBars collection class

A collection of all the command bars in SpinFire Professional.


SpinFirePro.CommandBarButton class

Represents a command bar button.

This class inherits the properties and methods of Actify.SpinFirePro.CommandBarControl.

[ Properties ]


SpinFirePro.CommandBarControl class

A control for a SpinFire Professional Add-In commmand bar.


SpinFirePro.CommandBarControls collection class

A collection of the controls in a command bar.

[ Properties ]


SpinFirePro.CommandBarPopup class

Represents a command popup menu.

This class is inherits the properties and methods of Actify.SpinFirePro.CommandBarControl.

[ Properties ]


SpinFirePro.Component class

Represents a component in SpinFire Professional.

[ Functions ]


SpinFirePro.Components class

A collection of all the Component objects that are currently registered in SpinFire Professional. The available components are "Home", "Library", "Viewer", and "Options".


SpinFirePro.Document class

A document in the WorkSpace.

Several types of documents can be included in the WorkSpace. The Type property indicates the document type.


SpinFirePro.Documents collection class

Collection of Actify.SpinFirePro.Document objects.

[ Properties ]


SpinFirePro.Workspace class

The .3D Workspace is a container for working with the documents that can be contained in a .3D file.


XView API Reference

Actify.XView3D is the 3D component of the SpinFire Viewer. XView provides the functions needed to work with geometries inside a 3D document in a .3D WorkSpace.

Note: An Actify.XView3D object should not be instantiated or embedded apart from the GetViewerObject() method, unless it is required for compatibility with older versions of .3D files that do not contain a WorkSpace.


Node Reference

Part or intermediate node of the assembly structure.


SF_Point API Reference

Point position in 3D space.

[ Properties ]


SF_Vector API Reference

Represents a three dimensional vector in space.


MarkupNote API Reference

Links a note to a three-dimensional vertex.

Note: Changing the properties will reset the LASTMODIFIED and CHANGER attributes of the markup.

<MARKUP
TYPE="Note"
ID="(user-defined)"
STAYFRONT="(True|False)"
LOCKPOSITION="(True|False)"
VISIBLE="(True|False)"
TRANSPARENCY="(0.0 to 1.0)"
NTYPE="(ntype)">
<sf:COLOR LABEL="r g b" />
<sf:LASTMODIFIED>
(month day HOUR:MINS:SEC YEAR)
</sf:LASTMODIFIED>
<sf:CREATION_TIME>
(month day HOUR:MINS:SEC YEAR)
</sf:CREATION_TIME>
<sf:CREATOR>(userName)</sf:CREATOR>
<sf:CHANGER>(userName)</sf:CHANGER>
<sf:FONT face="(fontName)" size="(fontSize)" RGBcolor="(r g b)" CharSet="(charset)" PitchAndFamily="(pitchandfamily)" />
<sf:POINT>(x y z)</sf:POINT>
<sf:POSITION>(x y z)</sf:POSITION>
<sf:TEXT>(note text)</sf:TEXT>
</MARKUP>


MarkupNote2D API Reference

Displays a 2D note overlayed on the graphics.

Note: Changing the properties will reset the LASTMODIFIED and CHANGER attributes of the markup.

<MARKUP
TYPE="Note2D"
ID="(user-defined)"
STAYFRONT="(True|False)"
LOCKPOSITION="(True|False)"
VISIBLE="(True|False)"
TRANSPARENCY="(0.0 to 1.0)" >
<sf:COLOR LABEL="r g b" />
<sf:LASTMODIFIED>(month day HOUR:MINS:SEC YEAR)</sf:LASTMODIFIED>
<sf:CREATION_TIME>(month day HOUR:MINS:SEC YEAR)</sf:CREATION_TIME>
<sf:CREATOR>(userName)</sf:CREATOR>
<sf:CHANGER>(userName)</sf:CHANGER>
<sf:FONT face="(fontName)" size="(fontSize)" RGBcolor="(r g b)" CharSet="(charset)" PitchAndFamily="(pitchandfamily)" />
<sf:POINT>(x y z)</sf:POINT>
<sf:POSITION>(x y z)</sf:POSITION>
<sf:TEXT>(note text)</sf:TEXT>
</MARKUP>


Markup Vertex API Reference

Measures the position of a vertex.

Note: Changing the properties will reset the LASTMODIFIED and CHANGER attributes of the markup.

<MARKUP
TYPE="Vertex"
ID="(user-defined)"
STAYFRONT="(True|False)"
LOCKPOSITION="(True|False)"
VISIBLE="(True|False)"
TRANSPARENCY="(0.0 to 1.0)"
UNITS="mm/in/µ/cm/m/km/µ-in/mils/ft/miles">
<sf:COLOR LABEL="r g b"/>
<sf:LASTMODIFIED>(month day HOUR:MINS:SEC YEAR)</sf:LASTMODIFIED>
<sf:CREATION_TIME>(month day HOUR:MINS:SEC YEAR)</sf:CREATION_TIME>
<sf:CREATOR>(userName)</sf:CREATOR>
<sf:CHANGER>(userName)</sf:CHANGER>
<sf:FONT face="(fontName)" size="(fontSize)" RGBcolor="(r g b)" CharSet="(charset)" PitchAndFamily="(pitchandfamily)" />
<sf:POINT>(x y z)</sf:POINT>
<sf:POSITION>(x y z)</sf:POSITION>
</MARKUP>


MarkupDistance API Reference

Measures the distance between two vertices.

Note: Changing the properties will reset the LASTMODIFIED and CHANGER attributes of the markup.

<SF:MARKUP
TYPE="Distance"
ID="(user-defined)"
STAYFRONT="(True|False)"
LOCKPOSITION="(True|False)"
VISIBLE="(True|False)"
TRANSPARENCY="(from 0.0 to 1.0)"
UNITS="mm/in/µ/cm/m/km/µ-in/mils/ft/miles"
DTYPE="(AlongX/AlongY/AlongZ/Normal)">
<sf:COLOR LABEL="r g b" />
<sf:LASTMODIFIED>(month day HOUR:MINS:SEC YEAR)</sf:LASTMODIFIED>
<sf:CREATION_TIME>(month day HOUR:MINS:SEC YEAR)</sf:CREATION_TIME>
<sf:CREATOR>(userName)</sf:CREATOR>
<sf:CHANGER>(userName)</sf:CHANGER>
<sf:FONT face="(fontName)" size="(fontSize)" RGBcolor="(r g b)" CharSet="(charset)" PitchAndFamily="(pitchandfamily)" />
<sf:FIRST>x y z</sf:FIRST>
<sf:SECOND>x y z</sf:SECOND>
<sf:POSITION>x y z</sf:POSITION>
</SF:MARKUP>


Markup3PtAngle API Reference

Measures an angle between three vertices.

Note: Changing the properties will reset the LASTMODIFIED and CHANGER attributes of the markup.

<sf:MARKUP
TYPE="3PtAngle"
ID="(user-defined)"
STAYFRONT="(True|False)"
LOCKPOSITION="(True|False)"
VISIBLE="(True|False)"
TRANSPARENCY="(from 0.0 to 1.0)"
ATYPE="Degree/Radians/DegreeMinSec/Grads">
<sf:COLOR LABEL="r g b" />
<sf:LASTMODIFIED>(month day HOUR:MINS:SEC YEAR)</sf:LASTMODIFIED>
<sf:CREATION_TIME>(month day HOUR:MINS:SEC YEAR)</sf:CREATION_TIME>
<sf:CREATOR>(userName)</sf:CREATOR>
<sf:CHANGER>(userName)</sf:CHANGER>
<sf:FONT face="(fontName)" size="(fontSize)" RGBcolor="(r g b)" CharSet="(charset)" PitchAndFamily="(pitchandfamily)" />
<sf:FIRST>x y z</sf:FIRST>
<sf:SECOND>x y z</sf:SECOND>
<sf:VERTEX>x y z</sf:VERTEX>
<sf:POSITION>x y z</sf:POSITION>
</sf:MARKUP>


Markup3PtCircle API Reference

Measures a circle by specifying three vertices.

Note: Changing the properties will reset the LASTMODIFIED and CHANGER attributes of the markup.

<sf:MARKUP TYPE="3PtCircle"
ID="(user-defined)"
STAYFRONT="(True|False)"
LOCKPOSITION="(True|False)"
VISIBLE="(True|False)"
TRANSPARENCY="(0.0 to 1.0)"
UNITS="mm/in/µ/cm/m/km/µ-in/mils/ft/miles"
CTYPE="(Arc/Circle)">
<sf:COLOR LABEL="r g b" />
<sf:LASTMODIFIED>(month day HOUR:MINS:SEC YEAR)</sf:LASTMODIFIED>
<sf:CREATION_TIME>(month day HOUR:MINS:SEC YEAR)</sf:CREATION_TIME>
<sf:CREATOR>(userName)</sf:CREATOR>
<sf:CHANGER>(userName)</sf:CHANGER>
<sf:FONT face="(fontName)" size="(fontSize)" RGBcolor="(r g b)" CharSet="(charset)" PitchAndFamily="(pitchandfamily)" />
<sf:POINT1>x y z</sf:POINT1>
<sf:POINT2>x y z</sf:POINT2>
<sf:POINT3>x y z</sf:POINT3>
<sf:POSITION>x y z</sf:POSITION>
</sf:MARKUP>


MarkupBoundBox API Reference

Measures the bounding box of a part (Node).

Note: Changing the properties will reset the LASTMODIFIED and CHANGER attributes of the markup.

<sf:MARKUP
TYPE="boundbox"
ID="(user-defined)"
STAYFRONT="(True|False)"
LOCKPOSITION="(True|False)"
VISIBLE="(True|False)"
TRANSPARENCY="(0.0 to 1.0)"
UNITS="mm/in/µ/cm/m/km/µ-in/mils/ft/miles" >
<sf:COLOR LABEL="r g b" />
<sf:LASTMODIFIED>(month day HOUR:MINS:SEC YEAR)</sf:LASTMODIFIED>
<sf:CREATION_TIME>(month day HOUR:MINS:SEC YEAR)</sf:CREATION_TIME>
<sf:CREATOR>(userName)</sf:CREATOR>
<sf:CHANGER>(userName)</sf:CHANGER>
<sf:FONT face="(fontName)" size="(fontSize)" RGBcolor="(r g b)" CharSet="(charset)" PitchAndFamily="(pitchandfamily)" />
<sf:GEOMETRY>Geometry_Name/Geometry_Path</sf:GEOMETRY>
<sf:MINPOINT>x y z</sf:MINPOINT>
<sf:MAXPOINT>x y z</sf:MAXPOINT>
<sf:POSITIONX>x y z</sf:POSITIONX>
<sf:POSITIONY>x y z</sf:POSITIONY>
<sf:POSITIONZ>x y z</sf:POSITIONZ>
</sf:MARKUP>


MarkupMassProperties API Reference

Measures mass properties of a part or an entire assembly structure.

Note: Changing the properties will reset the LASTMODIFIED and CHANGER attributes of the markup.

<SF:MARKUP>
TYPE="MassProperties"
ID="(user-defined)"
STAYFRONT="(True|False)"
LOCKPOSITION="(True|False)"
VISIBLE="(True|False)"
TRANSPARENCY="(0.0 to 1.0)"
UNITS="mm/in/µ/cm/m/km/µ-in/mils/ft/miles"
PTYPE="Volume/Surface/CenterMass">
<SF:COLOR LABEL="r g b" </SF:COLOR>
<sf:LASTMODIFIED>(month day HOUR:MINS:SEC YEAR)</sf:LASTMODIFIED>
<sf:CREATION_TIME>(month day HOUR:MINS:SEC YEAR)</sf:CREATION_TIME>
<sf:CREATOR>(userName)</sf:CREATOR>
<sf:CHANGER>(userName)</sf:CHANGER>
<sf:FONT face="(fontName)" size="(fontSize)" RGBcolor="(r g b)" CharSet="(charset)" PitchAndFamily="(pitchandfamily)" />
<SF:GEOMETRY>Gemometry_Name/Geometry_Path</SF:GEOMETRY>
<SF:POSITION>x y z</SF:POSITION>
<SF:SURFAREA>Surface</SF:SURFAREA>
<SF:VOLUME>Volume</SF:VOLUME>
<SF:CENTERMASS>CenterMass</SF:CENTERMASS>
</SF:MARKUP>


Markup2PtDraftAngle API Reference

Measures an angle between two vertices and a major axis direction.

Note: Changing the properties will reset the LASTMODIFIED and CHANGER attributes of the markup.

<sf:MARKUP
TYPE="2PtDraftAngle"
ID="(user-defined)"
STAYFRONT="(True|False)"
LOCKPOSITION="(True|False)"
VISIBLE="(True|False)"
TRANSPARENCY="(0.0 to 1.0)"
ATYPE="Degree/Radians/DegreeMinSec/Grads"
DIRECTION="(X|Y|Z|-X|-Y|-Z)" >
<sf:COLOR LABEL="r g b" />
<sf:LASTMODIFIED>(month day HOUR:MINS:SEC YEAR)</sf:LASTMODIFIED>
<sf:CREATION_TIME>(month day HOUR:MINS:SEC YEAR)</sf:CREATION_TIME>
<sf:CREATOR>(userName)</sf:CREATOR>
<sf:CHANGER>(userName)</sf:CHANGER>
<sf:FONT face="(fontName)" size="(fontSize)" RGBcolor="(r g b)" CharSet="(charset)" PitchAndFamily="(pitchandfamily)" />
<sf:FIRST>x y z</sf:FIRST>
<sf:SECOND>x y z</sf:SECOND>
<sf:POSITION>x y z</sf:POSITION>
</sf:MARKUP>


SF_ReferenceFrames API Reference

Collection of all the reference frame objects included in the 3D scene.

The Actify.XView3D object contains a ReferenceFrames property, which is an SF_ReferenceFrames collection object. A reference frame object (SF_ReferenceFrame) will not be included in the 3D scene until it is added to the Actify.XView3D.ReferenceFrames collection.


SF_ReferenceFrame API Reference

Represents a reference frame.

A 3D scene may contain multiple reference frames. All the reference frames in the current scene are included in the Actify.XView3D.ReferenceFrames collection (an SF_ReferenceFrames object). A reference frame will not be included in the scene until it is added to the Actify.XView3D.ReferenceFrames collection.

<sf:REFERENCEFRAME
VISIBLE="(True|False)"
ID="(user-definedID)">
<sf:ORIGIN>(x y z)</sf:ORIGIN>
<sf:XAXIS>(x y z)</sf:XAXIS>
<sf:YAXIS>(x y z)</sf:YAXIS>
<sf:ZAXIS>(x y z)</sf:ZAXIS>
<sf:LASTMODIFIED>
(month day HOUR:MINS:SEC YEAR)
</sf:LASTMODIFIED>
<sf:CREATION_TIME>
(month day HOUR:MINS:SEC YEAR)
</sf:CREATION_TIME>
<sf:CREATOR>(userName)</sf:CREATOR>
<sf:CHANGER>(userName)</sf:CHANGER>
</REFERENCEFRAME>


SF_FreeEdge API Reference

A free edge is defined by a series of connected edges.


SF_XViewPrintOptions API Reference

Options for the display of data when printing a document.

[ Functions ]


DXView API Reference

Actify.DXView is the 2D component of the SpinFire Viewer. Actify.DXView provides the functions needed to work with the pages, drawings, and markups of a 2D SpinFire document inside a .3D WorkSpace.

Note: An Actify.DXView object should not be instantiated or embedded apart from the GetViewerObject() method, unless it is required for compatibility with older versions of .3D files that do not contain a WorkSpace.


DxDocPage API Reference

A single page within the 2D viewer.


DxDocPages API Reference

Collection of all pages in the 2D viewer.


DxDrawings API Reference

Collection of drawings (SF_Paperspace objects) on a page (DxDocPage)


DxLineMarkup API Reference

A line markup.

The type of line is determined by the DxLineMarkup.Type property and can be any of the following values:

  • 0 = Straight Line
  • 1 = Polyline
  • 2 = Curved Line

Default value is 0 (Straight Line).

Note: Changing the properties will reset the LASTMODIFIED and CHANGER attributes of the markup.

<sf:MARKUP
ID="userDefinedID"
TYPE="LineMarkup"
VISIBLE="True|False"
ANGLE="degrees"
LTYPE="single|poly|spline"
CLOSEPOLYLINE="True|False"
BACKGROUND="True|False">
<sf:MODIFIED
TIME="month day HOUR:MINS:SEC YEAR"
BY="userName"/>
<sf:CREATE
TIME="month day HOUR:MINS:SEC YEAR"
BY="userName"/>
<sf:XTEXT>rolloverText</sf:TEXT>
<sf:A HREF="hypertextReference"/>
<sf:PEN
COLOR="hexCode"
TRANSPARENCY="0.00000000-1.00000000"
WIDTH="pixels"
DASH="0"/>
<sf:BRUSH
COLOR="#hexCode"
TRANSPARENCY="0.00000000-1.00000000"/>
<sf:POINTS>
<!--A "straight" line will have 2 points; "poly" and
"spline" may have several.-->
<sf:PT>x y</sf:PT>
<sf:PT>x y</sf:PT>
<sf:PT>x y</sf:PT>
</sf:POINTS>
<sf:TEXT
ALIGN="center|left|right"
VALIGN="bottom|middle|top"
FACE="fontName"
SIZE="points"
STYLE="0|1|2|3|4|8"
VISIBLE="True|False"
COLOR="#hexCode"
TRANSPARENCY="0.00000000-1.00000000">markupText</sf:TEXT>
</sf:MARKUP>


DxMarkups API Reference

[ Properties ] [ Functions ]


DxMeasurementMarkup API Reference

Represents a 2D measurement markup.

The specific type of measurement is determined by the Type property.

    Available measurement types:
  • 0 = Distance
  • 1 = Distance along X-axis
  • 2 = Distance along Y-axis
  • 3 = 3 point circle
  • 4 = 3 point angle
  • 5 = 4 point angle
  • 6 = Area

Note: Changing the properties will reset the MODIFIED and CHANGE attributes of the markup.

<sf:MARKUP
ID="userDefinedID"
TYPE="MeasurementMarkup"
VISIBLE="True|False"
ANGLE="degrees"
LTYPE="distance|distanceX|distanceY|
diameter|angle|angle4pt"
DRW="drawingName"
UNITS="measurementUnit">
<sf:MODIFIED
TIME="day month HOUR:MINS:SEC YEAR"
BY="userName"/>
<sf:CREATE
TIME="day month HOUR:MINS:SEC YEAR"
BY="userName"/>
<sf:XTEXT>rolloverText</sf:TEXT>
<sf:A HREF="hypertextReference"/>
<sf:PEN
COLOR="hexCode"
TRANSPARENCY="0.00000000-1.00000000"
WIDTH="pixels"/>
<sf:POINTS>
<!--distance will have 2 points; diameter,angle 3 points;
angle4pt four points-->
<sf:PT>x y</sf:PT>
...
<sf:PT>x y</sf:PT>
</sf:POINTS>
<sf:TEXT
ALIGN="center|left|right"
VALIGN="bottom|middle|top"
FACE="fontName"
SIZE="points"
STYLE="0|1|2|3|4|8"
VISIBLE="True|False"
COLOR="#hexCode"
TRANSPARENCY="0.00000000-1.00000000"
OFFSET="distanceLabelOffset"
DECIMALPLACES="Int"
SHOWUNITS="true|false">labelXPosition labelYPosition
</sf:TEXT>
<sf:LAYOUT
HEIGHT="distanceLabelPosition"
FULLCIRCLE="true|false"
MEASURERADIUS="true|false"
LARGEANGLE="true|false" />
</sf:MARKUP>


DxShapeMarkup API Reference

Represents a 2D shape markup.

A shape markup can be either a geometric shape (which may contain text), or it can be a pre-formatted stamp. Stamps are available in several languages, which can be set using the DxShapeMarkup.SetLangID() function.

The type of markup is determined by the DxShapeMarkup.Type property and can be any of the following values:

Geometric Markups:

  • Rectangle = 0
  • Ellipse = 1
  • RoundRectangle = 2
  • Irregular = 3
  • Cloud = 100
  • CalloutLeft = 101
  • CalloutRight = 102

Stamp Markups:

  • "Accepted" Stamp = 1000
  • "Approved" Stamp = 1001
  • "Rejected" Stamp = 1002
  • "Confidential" Stamp = 1003
  • "ForReview" Stamp = 1004
  • "Received" Stamp = 1005
  • "Draft" Stamp = 1006
  • "Preliminary" Stamp = 1007
  • "Final" Stamp = 1008

Note: Changing the properties will set the MODIFIED and CHANGE attributes of the markup.

<sf:MARKUP
ID="userDefinedID"
TYPE="ShapeMarkup"
VISIBLE="True|False"
ANGLE="degrees"
STYPE="rectangle|rrectangle|ellipse|
cloud|calloutleft|calloutright|
st_accepted|st_approved|st_rejected|st_confidential|
st_forrev|st_received|st_draft|st_prelim|st_final"
BORDER="True|False"
BACKGROUND="True|False">
<sf:MODIFIED
TIME="month day HOUR:MINS:SEC YEAR"
BY="userName"/>
<sf:CREATE
TIME="month day HOUR:MINS:SEC YEAR"
BY="userName"/>
<sf:XTEXT>rolloverText</sf:TEXT>
<sf:A HREF="hypertextReference"/>
<sf:PEN
COLOR="hexCode"
TRANSPARENCY="0.00000000-1.00000000"
WIDTH="pixels"
DASH="0"/>
<sf:BRUSH
COLOR="#hexCode"
TRANSPARENCY="0.00000000-1.00000000"/>
<sf:POINTS>
<sf:PT>x y</sf:PT> <!--Top-Left coordinates-->
<sf:PT>x y</sf:PT> <!--Bottom-Right coordinates-->
</sf:POINTS>
<sf:TEXT
ALIGN="center|left|right"
VALIGN="bottom|middle|top"
FACE="fontName"
SIZE="points"
STYLE="0|1|2|3|4|8"
VISIBLE="True|False"
COLOR="#hexCode"
TRANSPARENCY="0.00000000-1.00000000">markupText</sf:TEXT>
</sf:MARKUP>


DxTextMarkup API Reference

Represents a text markup.

Before a text markup will be visible, it must be added to a page's markups collecton (DxDocPage.Markups).

Note: Changing the properties will set the MODIFIED and CHANGE attributes of the markup.

<sf:MARKUP
ID="userDefinedID"
TYPE="TextMarkup"
VISIBLE="True|False"
ANGLE="degrees"
BORDER="True|False"
BACKGROUND="True|False">
<sf:MODIFIED
TIME="day month HOUR:MINS:SEC YEAR"
BY="userName"/>
<sf:CREATE
TIME="day month HOUR:MINS:SEC YEAR"
BY="userName"/>
<sf:XTEXT>rolloverText</sf:TEXT>
<sf:A HREF="hypertextReference"/>
<sf:POINTS>
<sf:PT>x y</sf:PT> <!--Top-Left coordinates-->
<sf:PT>x y</sf:PT> <!--Bottom-Right coordinates-->
</sf:POINTS>
<sf:PEN
COLOR="hexCode"
TRANSPARENCY="0.00000000-1.00000000"
WIDTH="pixels"
DASH="0"/>
<sf:BRUSH
COLOR="#hexCode"
TRANSPARENCY="0.00000000-1.00000000"/>
<sf:TEXT
ALIGN="center|left|right"
VALIGN="bottom|middle|top"
FACE="fontName"
SIZE="points"
STYLE="0|1|2|3|4|8"
VISIBLE="True|False"
COLOR="#hexCode"
TRANSPARENCY="0.00000000-1.00000000">markupText</sf:TEXT>
</sf:MARKUP>


SF_Attribute API Reference

An attribute is a name/value pair. It can be used to attach user data to an SF_Layer object.

[ Properties ]


SF_Attributes collection interface

Collection of SF_Attribute objects.

The index of the collection begins at 1.


SF_BoundingBox2D API Reference

A bounding box indicates the extents and the area occupied by a drawable object.


SF_Layer API Reference

Represents a layer of a drawing.


SF_Layers API Reference

Collection of SF_Layer objects.

A 2D drawing (represented by an SF_Paperspace object) can contain several layers.


SF_Paperspace API Reference

The SF_Paperspace interface represents a 2D drawing.

<sf:DRAWING
TYPE="MULTILAYER"
LOCK_AR="True|False"
ID="userDefinedID"
X="x-coordinate"
Y="y-coordinate"
W="width"
H="height"
ANGLE="degrees"
HIDDEN="True|False"
LOCK="True|False"
CAL="calibrationFactor"
DIDEMFOFFSET="True|False">
<sf:LAYER
ID="userDefinedID"
VISIBLE="True|False"
TYPE="EMF|RASTER|SNAPSHOT"
W="width"
H="height"
X="x-coordinate"
Y="y-coordinate">fileName</sf:LAYER>...
</sf:DRAWING>


SF_Transform API Reference

The SF_Transform interface specifies a 4 x 4 transformation matrix (in homogenous coordinates) used to transform SF_Layer objects. A 16 element matrix is used even though the transform is being applied to 2D objects.


Using SpinFire Viewer Properties

This chapter will show you how to set SpinFire Viewer properties from the browser.

SpinFire Viewer Properties in Internet Explorer

All the SpinFire Viewer properties can be set and read in the standard way under Internet Explorer (<obj>.<property> = <value>). For example, the JavaScript code for setting a white background for SpinFire Viewer within Microsoft Internet Explorer will look like this:

<!-- This code will work only in Internet Explorer -->

<OBJECT
Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
Id="SFview">
<PARAM NAME="ModelName" VALUE="myPart.3D">
</Object>

<Script Language="JavaScript">
SFview.Background = '255 255 255';
</Script>

Note: Only the Microsoft Internet Explorer browser is currently supported.


XML 3D Scene Description

Contents

  • Introduction
  • Geometry
  • Markup
  • PState
  • Part references and part movements

Introduction

SpinFire uses the Extensible Markup Language (XML) to describe a three-dimensional scene. This chapter describes how SpinFire uses XML to describe a 3D scene.
A simple example is always the best way to start. The following is a valid XML text.

Note: This topic describes the XML used for a 3D document. The XML used for 2D documents is different. See a topic describing a specific 2D object for its XML reference.

<?xml version="1.0" ?>
<TAG-A>
<TAG-B>
<TAG-C>
...
</TAG-C>
</TAG-B>
</TAG-A>

XML is similar to HTML. The actual tags are differnet, but the main concept is the same. XML is more rigid than HTML: each tag you open must be closed in the right order.

The SpinFire scene description is described via XML through a set of specific tags. These tags are part of the namespace identified by the url:

http://www.actify.com/namespaces/SpinFire.

The root element of a SpinFire scene description is represented by the <XVSCENE> tag.

The SpinFire XML scene description always has the following structure:

<?xml version="1.0" ?>
<sf:XVSCENE xmlns:sf="http://www.actify.com/namespaces/SpinFire">
...
</sf:XVSCENE>

Typically a SpinFire three-dimensional scene is composed of:

  • An observation camera through which the scene is displayed
  • Geometries identified by the tag <sf:GEOMETRY>
  • A cross-section plane (by default inactive)
  • Markup objects identified by the tag <sf:MARKUP>
  • User defined views identified by the tag <sf:PSTATE>

The observation camera and the cross-section plane are defined by default; there are no tags to create such objects, but there are tags (see the PSTATE paragraph) to modify their properties.

The geometries are described by the tag <sf:GEOMETRY>, the markups are described by the tag <MARKUP> while the views are described by the tag <PSTATE>, it means properties state. A typical scene will have the following structure:

<?xml version="1.0" ?>

<sf:XVSCENE>
<sf:GEOMETRY ID="...">
....
</sf:GEOMETRY>
<sf:MARKUP TYPE="...">
....
</sf:MARKUP>
<sf:PSTATE NAME="...">
....
</sf:PSTATE>
</XVSCENE>

Geometry

The <sf:GEOMETRY> tag provides the file name of a geometry file inside or outside the SpinFire [.3D] file. Typically you have something like:

<sf:GEOMETRY ID="bottom_panel">
bottom_panel.3DG
</sf:GEOMETRY>

Because the value of the ID attribute is an internal identifier, you can use it to refer to this geometry in other sections of the scene (the ID attribute is optional).
Other optional attributes for the <sf:GEOMETRY> tag are:

    TRASPARENCY = <0.0...1.0>
    SHADING=<Normal|WireFrames|TriangleMesh|Smooth|HiddenLines|Dots|ShadedEdges>
    EXTCOLOR=< 0.0...1.0 , 0.0...1.0 , 0.0...1.0 >
    INTCOLOR=< 0.0...1.0 , 0.0...1.0 , 0.0...1.0 >

So you can have a <sf:GEOMETRY> definition like this:

<sf:GEOMETRY ID="bottom_panel"
TRASPARENCY="0.5"
SHADING="Smooth"
EXTCOLOR="1.0 0.0 0.0"
INTCOLOR="1.0 0.0 0.0">
bottom_panel.3DG
</sf:GEOMETRY>

You can have as many geometry tags as you want inside a SpinFire scene. You will be able to retrieve them via their IDs.

Markup

SpinFire manages markup objects like distance measurements, 3D notes, and Mass properties. All these objects are described with the <sf:MARKUP> tag.

The <sf:MARKUP> tag has different syntaxes depending on the type of markup you want to insert into the scene. The general syntax, common to all markups, is the following:

<sf:MARKUP TYPE="markup-type-name" ID= "some-id"... >
...
</sf:MARKUP>

Because the value of the ID attribute is an internal identifier you can use it to refer to this markup in other sections of the scene (the ID is optional).
The markup-type-name can be one of the following:

  • "Note"
  • "Note2D"
  • "Vertex"
  • "Distance"
  • "3PtAngle"
  • "3PtCircle"
  • "BoundBox"
  • "MassProperties"
  • "3PtDraftAngle"

Follow the links for a description of their syntax.

PState

The PSTATE allows the user to define a specific view of the scene, inluding changes to the attributes of the objects in the scene.

In the <sf:PSTATE> section you can modify the attributes of all the objects. You can modify the camera position, the cross-section orientation and change the appearance of the geometries and markup objects defined earlier in the XML scene description.

The <sf:PSTATE> section has the following structure:

<sf:PSTATE NAME="..." >
<sf:GEOSTATE>
<sf:GEOMETRY ID="...">...</sf:GEOMETRY>
</sf:GEOSTATE>
<sf:MKSTATE>
<sf:MARKUP ID="...">...</sf:MARKUP>
</sf:MKSTATE>
<sf:CAMERA>
<sf:PROJ>...</sf:PROJ>
<sf:VUV>...</sf:VUV>
<sf:TARGET>...</sf:TARGET>
<sf:EYE>...</sf:EYE>
</sf:CAMERA>
<sf:XSECTION>
<sf:POSITION>...</sf:POSITION>
<sf:DIRECTION>...</sf:DIRECTION>
</sf:XSECTION>
</sf:PSTATE>

You can create any number of PSTATEs. All the sections are optional inside a PSTATE. This means that you do not need to specify any geometries, markups, camera positions or cross-section.

The empty PSTATE is therefore a valid, but not a very useful, construct:

<sf:PSTATE NAME="..." >
</sf:PSTATE>

A more useful, but still a simple PSTATE is the one that changes the position of the observer:

<sf:PSTATE NAME="..." >
<sf:CAMERA>
<sf:PROJ>Perspective</sf:PROJ>
<sf:VUV>0.0 0.0 1.0</sf:VUV>
<sf:TARGET>100.0 100.0 100.0</sf:TARGET>
<sf:EYE>0.0 0.0 0.0</sf:EYE>
</sf:CAMERA>
</sf:PSTATE>

You can create a PSTATE where a part becomes invisible:

<sf:PSTATE NAME="..." >
<sf:GEOSTATE>
<sf:GEOMETRY ID="..."SHADING="Hide">...</sf:GEOMETRY>
</sf:GEOSTATE>
</sf:PSTATE>

You can create a PSTATE where a markup object changes position:

<sf:PSTATE NAME="..." >
<sf:MKSTATE>
<sf:MARKUP ID="...">
<sf:POSITION>100.0 100.0 100.0<sf:POSITION>
</sf:MARKUP>
</sf:MKSTATE>
</sf:PSTATE>

All the PSTATEs listed in the scene description file are available to the user of the SpinFire Reader of SpinFire Professional as entries under the Views menu.

All the PSTATEs listed in the scene description file are also available through the API of the plug-in control. The ViewApply() function activates a given PSTATE. The ViewGetFirst() and ViewGetNext() functions scans all the PSTATEs of the scene.

Part references and part movements

SpinFire .3D files contain a tree structure representing the assembly configuration of the original model.

Within the XML scene description it is possible to refer to a single node of the assembly structure by using a path-name convention similar to the one used to locate files in a directory structure.

The path name of a node is expressed by a sequence of intermediate node names separated by a forward slash (/).

//<root_node>/<node_name>/.../<node_name>

It is possible to refer to a specific part from inside a PSTATE for manipulation of its properties. The following XML shows how a PSTATE can hide a part given its path-name.

<sf:PSTATE NAME="..." >
<sf:GEOSTATE>
<sf:GEOMETRY ID="//m1/root/subasm1/prt1" SHADING="Hide"/>
</sf:GEOSTATE>
</sf:PSTATE>

It is possible to create an alias for long pathnames using the tag <sf:PART>. This allows to refer to a part with a short alias name.

<sf:PART PATH="//m1/root/subasm1/prt1" NAME="SimpleName" />

<sf:PSTATE NAME="..." >
<sf:GEOSTATE>
<sf:GEOMETRY ID="SimpleName" ="Hide"/>
</sf:GEOSTATE>
</sf:PSTATE>

Inside a PSTATE it is possible to impose a geometric transformation to a model or to a single part. These transformations can be expressed by using the tags <sf:TRANSLATE> and <sf:ROTATE>.

In the case of the previous example we can impose a roto-translation:

<sf:PART PATH="//m1/root/subasm1/prt1" NAME="SimpleName" />

<sf:PSTATE NAME="..." >
<sf:GEOSTATE>
<sf:GEOMETRY ID="SimpleName" >
<sf:ROTATE>0.0 0.0 1.0 90.0</sf:ROTATE>
<sf:TRANSLATE>10.0 10.0 0.0</sf:TRANSLATE>
</sf:GEOMETRY>
</sf:GEOSTATE>
</sf:PSTATE>

The precise syntax for these tags is:

<sf:ROTATE> xDir yDir zDir Angle </sf:ROTATE>
<sf:TRANSLATE> xTrn yTrn zTrn </sf:TRANSLATE>

Where xDir yDir zDir indicate the rotation axis, Angle is the rotation in degrees,
and xTrn yTrn zTrn indicate the translations along the three main axis.


Please Include me in the .chm fiules list

This page with unique target to force the help system to include the images in the [.chm] file.


MarkupNote Reference

 SFMake3D API Reference
Bool AddFileTo3D String geoFile
String out3DFile
Bool silent
Bool computeLOD
Bool preserveExt

Description:
    Add a new geometry file to an existing .3D file.
Input Parameters:
    geoFile | file to be converted into .3D format
out3DFile | existing .3D filename
silent | TRUE no output will appear on the screen, FALSE dialog boxes and progress bar will appear on screen
computeLOD | TRUE if Levels Of Detail are desired in the resulting 3D file, FALSE otherwise
preserveExt | TRUE if the original file extension should be built into the resulting file name, FALSE otherwise.

Return Value:
    TRUE if the creation of the 3D file has been successful, FALSE otherwise.
    Call GetLastError() to get the error type if return value is FALSE.

See also:
  • The MakeFileTo3D() function.

©2000 Actify Corporation. All Rights reserved worldwide. Actify and SpinFire are trademarks of Actify. All other brand and product names may be trademarks or registered trademarks of their respective owners.


SpinFirePro.Application.CommandBarBeforeUpdate Event

private void spinfireApp_CommandBarBeforeUpdate(int ctrlID, ref bool enabled, ref bool handled) {
if (ctrlID == Actify.SpinFirePro.CMDID.CMDID_FILE_SAVE)
{
handled = true;
enabled = AllowSave();
}
}


SpinFirePro.Document.GetViewerObject function

<HTML>
<BODY>
<br>
<OBJECT
____classid="CLSID:B5805FAB-FDB6-425C-9076-260430E189E6"
____id="SFR"
____height="400"
____width="500">
____<PARAM Name="src" Value="Models/Multidoc.3D">
</OBJECT>

<INPUT type="button" value="Previous Document" onclick="PrevDocument()">
<INPUT type="button" value="Next Document" onclick="NextDocument()">
<br>
<INPUT type="button" value="4 Viewports" onclick="viewports()">
<INPUT type="button" value="Draw Rejected Stamp" onclick="rejected()">
<SCRIPT LANGUAGE="JScript">
function viewports()
{
var doc = SFR.ActiveDocument;

//Check that an XView3D doc is active
if (doc.Type == 1){
//Retrieve the XView3D object for the document
var XV = doc.GetViewerObject();
//Call an XView3D function
XV.New4ViewsViewport();
}else{
alert("Function available for 3D documents only.");
}
}

function rejected()
{
var doc = SFR.ActiveDocument;

//Check that a DXView doc is active
if (doc.Type == 2){
alert("Drag to draw the stamp");
var dxview = doc.GetViewerObject();
var shape = dxview.CreateMarkup("ShapeMarkup");
shape.Type = 1002; //Rejected stamp

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(shape);
}else{
alert("Function available for SpinFire 2D documents only.");
}
}
</SCRIPT>
</BODY>
</HTML>

Run this example


SpinFirePro.DocumentType enumeration

Indicates the type of the document.

DocumentType Values
Type | Value | Description
sfUnknownDocumentType | 0 | Unknown document type
sfXViewDocumentType | 1 | 3D document. Access this type of document through the Actify.XView3D object.
sfDXViewDocumentType | 2 | 2D image document. Access this type of document through the Actify.DXView object.
sfWebPageDocumentType | 3 |
sfOtherDocumentType | 4 |


DxContext API Reference

[ Properties ] [ Functions ]


DxDocPage.GetMSXMLFragment

<HTML>
<HEAD>
<SCRIPT>
function pageXML()
{
var pagexml = dxview.Pages(1).GetMSXMLFragment();
alert(pagexml.xml);
}
</SCRIPT>
</HEAD>

<BODY>
<OBJECT
id="dxview"
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
height="500"
width="500">
<PARAM name="src" value="Models/Rotor2D.3D">
</OBJECT>
<BR>

<INPUT type="button" value="Get Page XML" onclick="pageXML()">

</BODY>
</HTML>


DxLineCapStyle API Reference

Indicates the style used for the start point (DxLineMarkup.StartCap) or end point (DxLineMarkup.EndCap) of a line markup.

Those using a language (such as Javascript) which does not support enumerations can treat properties of the DxLinCapStyle type as an integer which supports the values listed below.


DxLineMarkup.SetEndPos

<HTML>
<HEAD>
<SCRIPT>
function addAPage()
{
if (dxview.Pages.Count<1)
{
dxview.SetUnitName("Inches");
dxview.PageWidth = 8.5;
dxview.PageHeight = 11.0;
}
var page = null;
// Create a new page and add it to the pages collection
page = dxview.CreatePage();
dxview.Pages.Add( page );

//Display the new page
dxview.DisplayPageNumber(dxview.Pages.Count);
dxview.Refresh();
}

function createFixedLine()
{
var line = dxview.CreateMarkup("LineMarkup");
line.Type = 0 //Straight line

//Set the start and end points of the line
line.SetStartPos(5.0, 95.0);
line.SetEndPos(150.0, 115.0);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(line);
}
</SCRIPT>
</HEAD>

<BODY onLoad="addAPage()">
<OBJECT
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
id="dxview"
border="1"
height="500"
width="500">
</OBJECT>
<BR>

<INPUT type="button" name="" value="Add Fixed Line" onclick="createFixedLine()" />

</BODY>
</HTML>


DxLineMarkup.SetStartPos

<HTML>
<HEAD>
<SCRIPT>
function addAPage()
{
if (dxview.Pages.Count<1)
{
dxview.SetUnitName("Inches");
dxview.PageWidth = 8.5;
dxview.PageHeight = 11.0;
}
var page = null;
// Create a new page and add it to the pages collection
page = dxview.CreatePage();
dxview.Pages.Add( page );

//Display the new page
dxview.DisplayPageNumber(dxview.Pages.Count);
dxview.Refresh();
}

function createFixedLine()
{
var line = dxview.CreateMarkup("LineMarkup");
line.Type = 0 //Straight line

//Set the start and end points of the line
line.SetStartPos(5.0, 95.0);
line.SetEndPos(150.0, 115.0);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(line);
}
</SCRIPT>
</HEAD>

<BODY onLoad="addAPage()">
<OBJECT
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
id="dxview"
border="1"
height="500"
width="500">
</OBJECT>
<BR>

<INPUT type="button" name="" value="Add Fixed Line" onclick="createFixedLine()" />

</BODY>
</HTML>


DxMeasurementMarkup.DrawCircle

<HTML>
<HEAD>
<SCRIPT>
function addAPage()
{
dxview.SetUnitName("Inches");
dxview.PageWidth = 8.5;
dxview.PageHeight = 11.0;

var page = null;
// Create a new page and add it to the pages collection
page = dxview.CreatePage();
dxview.Pages.Add( page );

//Display the new page
dxview.DisplayPageNumber(dxview.Pages.Count);
}

function createMeasurement1()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 0; // Distance
measurement.SetMeasurementUnit(1);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement2()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 6; // Area
measurement.SetMeasurementUnit(12);
measurement.Color = 0x007700;

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement3()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 3; // 3pt circle
measurement.SetMeasurementUnit(2);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement4()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 3; // 3pt circle
measurement.SetMeasurementUnit(2);
measurement.Color = 0;
measurement.MeasureRadius(true);
measurement.DrawCircle(false);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement5()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 4; // 3pt angle
measurement.SetMeasurementUnit(2);
measurement.MeasureLargerAngle(true);
// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement6()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 5; // 4pt angle
measurement.SetShowUnit(false);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

</SCRIPT>
</HEAD>

<BODY>
<OBJECT>
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
id="dxview"
border="1"
height="500"
width="500">
<PARAM Name="BorderWidth" Value=0>
<PARAM Name="PageWidth" Value=100.0>
<PARAM Name="PageHeight" Value=150.0>
<PARAM Name="PageDpi" Value=150.0>
<PARAM Name="LeftBorder" Value=10>
<PARAM Name="RightBorder" Value=10>
<PARAM Name="TopBorder" Value=15>
<PARAM Name="BottomBorder" Value=15>
<PARAM Name="GridX" Value=1>
<PARAM Name="GridY" Value=1>
<PARAM Name="SelectionMode" Value=2>
<PARAM Name="ViewGrid" Value=true>
<PARAM Name="src" Value="models/demo1.3D">
</OBJECT>
<BR>

<INPUT type="button" name="" value="Measure Distance" onclick="createMeasurement1()" /><br>
<INPUT type="button" name="" value="Measure Area" onclick="createMeasurement2()" /><br>
<INPUT type="button" name="" value="Measure Diameter" onclick="createMeasurement3()" /><br>
<INPUT type="button" name="" value="Measure Radius" onclick="createMeasurement4()" /><br>
<INPUT type="button" name="" value="Measure 3pt (outer) Angle" onclick="createMeasurement5()" /><br>
<INPUT type="button" name="" value="Measure 4pt Angle" onclick="createMeasurement6()" /><br>

</BODY>
</HTML>


DxMeasurementMarkup.MeasureLargerAngle

<HTML>
<HEAD>
<SCRIPT>
function addAPage()
{
dxview.SetUnitName("Inches");
dxview.PageWidth = 8.5;
dxview.PageHeight = 11.0;

var page = null;
// Create a new page and add it to the pages collection
page = dxview.CreatePage();
dxview.Pages.Add( page );

//Display the new page
dxview.DisplayPageNumber(dxview.Pages.Count);
}

function createMeasurement1()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 0; // Distance
measurement.SetMeasurementUnit(1);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement2()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 6; // Area
measurement.SetMeasurementUnit(12);
measurement.Color = 0x007700;

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement3()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 3; // 3pt circle
measurement.SetMeasurementUnit(2);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement4()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 3; // 3pt circle
measurement.SetMeasurementUnit(2);
measurement.Color = 0;
measurement.MeasureRadius(true);
measurement.DrawCircle(false);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement5()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 4; // 3pt angle
measurement.SetMeasurementUnit(2);
measurement.MeasureLargerAngle(true);
// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement6()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 5; // 4pt angle
measurement.SetShowUnit(false);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

</SCRIPT>
</HEAD>

<BODY>
<OBJECT>
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
id="dxview"
border="1"
height="500"
width="500">
<PARAM Name="BorderWidth" Value=0>
<PARAM Name="PageWidth" Value=100.0>
<PARAM Name="PageHeight" Value=150.0>
<PARAM Name="PageDpi" Value=150.0>
<PARAM Name="LeftBorder" Value=10>
<PARAM Name="RightBorder" Value=10>
<PARAM Name="TopBorder" Value=15>
<PARAM Name="BottomBorder" Value=15>
<PARAM Name="GridX" Value=1>
<PARAM Name="GridY" Value=1>
<PARAM Name="SelectionMode" Value=2>
<PARAM Name="ViewGrid" Value=true>
<PARAM Name="src" Value="models/demo1.3D">
</OBJECT>
<BR>

<INPUT type="button" name="" value="Measure Distance" onclick="createMeasurement1()" /><br>
<INPUT type="button" name="" value="Measure Area" onclick="createMeasurement2()" /><br>
<INPUT type="button" name="" value="Measure Diameter" onclick="createMeasurement3()" /><br>
<INPUT type="button" name="" value="Measure Radius" onclick="createMeasurement4()" /><br>
<INPUT type="button" name="" value="Measure 3pt (outer) Angle" onclick="createMeasurement5()" /><br>
<INPUT type="button" name="" value="Measure 4pt Angle" onclick="createMeasurement6()" /><br>

</BODY>
</HTML>


DxMeasurementMarkup.MeasureRadius

<HTML>
<HEAD>
<SCRIPT>
function addAPage()
{
dxview.SetUnitName("Inches");
dxview.PageWidth = 8.5;
dxview.PageHeight = 11.0;

var page = null;
// Create a new page and add it to the pages collection
page = dxview.CreatePage();
dxview.Pages.Add( page );

//Display the new page
dxview.DisplayPageNumber(dxview.Pages.Count);
}

function createMeasurement1()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 0; // Distance
measurement.SetMeasurementUnit(1);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement2()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 6; // Area
measurement.SetMeasurementUnit(12);
measurement.Color = 0x007700;

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement3()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 3; // 3pt circle
measurement.SetMeasurementUnit(2);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement4()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 3; // 3pt circle
measurement.SetMeasurementUnit(2);
measurement.Color = 0;
measurement.MeasureRadius(true);
measurement.DrawCircle(false);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement5()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 4; // 3pt angle
measurement.SetMeasurementUnit(2);
measurement.MeasureLargerAngle(true);
// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement6()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 5; // 4pt angle
measurement.SetShowUnit(false);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

</SCRIPT>
</HEAD>

<BODY>
<OBJECT>
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
id="dxview"
border="1"
height="500"
width="500">
<PARAM Name="BorderWidth" Value=0>
<PARAM Name="PageWidth" Value=100.0>
<PARAM Name="PageHeight" Value=150.0>
<PARAM Name="PageDpi" Value=150.0>
<PARAM Name="LeftBorder" Value=10>
<PARAM Name="RightBorder" Value=10>
<PARAM Name="TopBorder" Value=15>
<PARAM Name="BottomBorder" Value=15>
<PARAM Name="GridX" Value=1>
<PARAM Name="GridY" Value=1>
<PARAM Name="SelectionMode" Value=2>
<PARAM Name="ViewGrid" Value=true>
<PARAM Name="src" Value="models/demo1.3D">
</OBJECT>
<BR>

<INPUT type="button" name="" value="Measure Distance" onclick="createMeasurement1()" /><br>
<INPUT type="button" name="" value="Measure Area" onclick="createMeasurement2()" /><br>
<INPUT type="button" name="" value="Measure Diameter" onclick="createMeasurement3()" /><br>
<INPUT type="button" name="" value="Measure Radius" onclick="createMeasurement4()" /><br>
<INPUT type="button" name="" value="Measure 3pt (outer) Angle" onclick="createMeasurement5()" /><br>
<INPUT type="button" name="" value="Measure 4pt Angle" onclick="createMeasurement6()" /><br>

</BODY>
</HTML>


DxMeasurementMarkup.SetMeasurementUnit

<HTML>
<HEAD>
<SCRIPT>
function addAPage()
{
dxview.SetUnitName("Inches");
dxview.PageWidth = 8.5;
dxview.PageHeight = 11.0;

var page = null;
// Create a new page and add it to the pages collection
page = dxview.CreatePage();
dxview.Pages.Add( page );

//Display the new page
dxview.DisplayPageNumber(dxview.Pages.Count);
}

function createMeasurement1()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 0; // Distance
measurement.SetMeasurementUnit(1);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement2()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 6; // Area
measurement.SetMeasurementUnit(12);
measurement.Color = 0x007700;

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement3()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 3; // 3pt circle
measurement.SetMeasurementUnit(2);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement4()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 3; // 3pt circle
measurement.SetMeasurementUnit(2);
measurement.Color = 0;
measurement.MeasureRadius(true);
measurement.DrawCircle(false);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement5()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 4; // 3pt angle
measurement.SetMeasurementUnit(2);
measurement.MeasureLargerAngle(true);
// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

function createMeasurement6()
{
var measurement = dxview.CreateMarkup("MeasurementMarkup");
measurement.Type = 5; // 4pt angle
measurement.SetShowUnit(false);

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(measurement);
}

</SCRIPT>
</HEAD>

<BODY>
<OBJECT>
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
id="dxview"
border="1"
height="500"
width="500">
<PARAM Name="BorderWidth" Value=0>
<PARAM Name="PageWidth" Value=100.0>
<PARAM Name="PageHeight" Value=150.0>
<PARAM Name="PageDpi" Value=150.0>
<PARAM Name="LeftBorder" Value=10>
<PARAM Name="RightBorder" Value=10>
<PARAM Name="TopBorder" Value=15>
<PARAM Name="BottomBorder" Value=15>
<PARAM Name="GridX" Value=1>
<PARAM Name="GridY" Value=1>
<PARAM Name="SelectionMode" Value=2>
<PARAM Name="ViewGrid" Value=true>
<PARAM Name="src" Value="models/demo1.3D">
</OBJECT>
<BR>

<INPUT type="button" name="" value="Measure Distance" onclick="createMeasurement1()" /><br>
<INPUT type="button" name="" value="Measure Area" onclick="createMeasurement2()" /><br>
<INPUT type="button" name="" value="Measure Diameter" onclick="createMeasurement3()" /><br>
<INPUT type="button" name="" value="Measure Radius" onclick="createMeasurement4()" /><br>
<INPUT type="button" name="" value="Measure 3pt (outer) Angle" onclick="createMeasurement5()" /><br>
<INPUT type="button" name="" value="Measure 4pt Angle" onclick="createMeasurement6()" /><br>

</BODY>
</HTML>


DxTextMarkup.SetAutoCompleteText

<HTML>
<HEAD>
<SCRIPT>
function addAPage()
{
dxview.SetUnitName("Inches");
dxview.PageWidth = 8.5;
dxview.PageHeight = 11.0;

var page = null;
// Create a new page and add it to the pages collection
page = dxview.CreatePage();
dxview.Pages.Add( page );

//Display the new page
dxview.DisplayPageNumber(dxview.Pages.Count);
}

function createLine()
{
var line = dxview.CreateMarkup("LineMarkup");
line.Type = 0 //Straight line

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(line);
}

function createEllipse()
{
var shape = dxview.CreateMarkup("ShapeMarkup");
shape.Type = 1 //Ellipse

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(shape);
}

function createText()
{
var text = dxview.CreateMarkup("TextMarkup");
text.SetFont("courier new", 32, 0);
text.SetAutoCompleteText("Enter text");

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(text);
}
</SCRIPT>
</HEAD>

<BODY onLoad="addAPage()">
<OBJECT
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
id="dxview"
border="1"
height="500"
width="500">
</OBJECT>
<BR>

<INPUT type="button" name="" value="Add Line" onclick="createLine()" />
<INPUT type="button" name="" value="Add Ellipse Markup" onclick="createEllipse()" />
<INPUT type="button" name="" value="Add Text Markup" onclick="createText()" />

</BODY>
</HTML>


DxTextMarkup.SetPosition

<html>
<body>
<script>
var useScreenspace;

function setScreenSpace(bool)
{
useScreenspace = bool;
}

function addAPage()
{
var page = null;
// Create a new page and add it to the page collection
page = dxview.CreatePage();
dxview.Pages.Add( page );
dxview.DisplayPageNumber(dxview.Pages.Count);

dxview.Refresh();
}

function createText()
{
var tMarkup = dxview.CreateMarkup("textbox");

tMarkup.SetText("This is a Text Markup");
tMarkup.SetPosition(0.5,0.5);
tMarkup.Color = 0x0000ff;
tMarkup.visible = true;
tMarkup.BackgroundVisible = true;
tMarkup.BackgroundTransparency = 0.0;
tMarkup.BackgroundColor = 0xff0000;
tMarkup.BorderVisible = true;
tMarkup.BorderTransparency = 0.0;
tMarkup.BorderColor = 0x0000ff;
tMarkup.ScreenSpace = useScreenspace;

// Add image to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(tMarkup);
dxview.Refresh();
}
</script>
</head>

<body>
<div style="width: 500px; height: 500px;">
<object id="dxview" classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041" height="100%" width="100%" VIEWASTEXT>
<PARAM Name="BorderWidth" Value=0>
<PARAM Name="PageWidth" Value=100.0>
<PARAM Name="PageHeight" Value=150.0>
<PARAM Name="PageDpi" Value=150.0>
<PARAM Name="LeftBorder" Value=10>
<PARAM Name="RightBorder" Value=10>
<PARAM Name="TopBorder" Value=15>
<PARAM Name="BottomBorder" Value=15>
<PARAM Name="GridX" Value=1>
<PARAM Name="GridY" Value=1>
<PARAM Name="SelectionMode" Value=2>
<PARAM Name="ViewGrid" Value=true>
</object>
</div>

<input type="button" value="AddPage" onclick="addAPage()" />
<input type="button" value="CreateText" onclick="createText()" /><br />
<br />
<input type="button" value="Use Screen Space" onclick="setScreenSpace(true)" />
<input type="button" value="Use Paper Space" onclick="setScreenSpace(false)" />

</body>
</html>


DXView.ClearDocument

<HTML>
<HEAD>
<SCRIPT>
function addAPage()
{
dxview.SetUnitName("Inches");
dxview.PageWidth = 8.5;
dxview.PageHeight = 11.0;

// Create a new page and add it to the page collection
var page = dxview.CreatePage();
dxview.Pages.Add( page );
dxview.DisplayPageNumber(dxview.Pages.Count);

// Add the page number as a text markup
var num = dxview.GetCurrentPageNumber();
var text = dxview.CreateMarkup("TextMarkup");
text.SetFont("courier new", 72, 2);
text.SetText("Page " + num);
text.SetPosition(50,150);
page.Markups.Add(text);
}

function goToPage()
{
var pagenum = parseInt(prompt("Enter page number",""));

if (pagenum > dxview.Pages.Count){
alert("No such page");
}else if(pagenum <= 0){
alert("No such page");
}else{
dxview.DisplayPageNumber(pagenum);
}
}

function clearDoc()
{
dxview.ClearDocument();
}
</SCRIPT>
</HEAD>

<BODY>
<OBJECT
id="dxview"
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
height="500"
width="500">
</OBJECT>
<BR>

<INPUT type="button" value="Add A Page" onclick="addAPage()">
<INPUT type="button" value="Go To Page" onclick="goToPage()">
<INPUT type="button" value="Clear Document" onclick="clearDoc()">
</BODY>
</HTML>


DXView.CreateImage

<HTML>
<HEAD>
<SCRIPT>
function createImage()
{
var img = dxview.CreateImage("Models/image.jpg");

// Add image to the current page
var cpage = dxview.GetCurrentPageNumber();
var page = dxview.Pages.Item(cpage);
page.Drawings.Add(img);

//Change to drawing selection mode
dxview.SelectionMode = 1;
}
</SCRIPT>
</HEAD>

<BODY>
<OBJECT
id="dxview"
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
height="500"
width="500"
border="1">
<PARAM Name="BorderWidth" Value=1>
<PARAM Name="PageWidth" Value=100.0>
<PARAM Name="PageHeight" Value=150.0>
<PARAM Name="PageDpi" Value=150.0>
<PARAM Name="LeftBorder" Value=10>
<PARAM Name="RightBorder" Value=10>
<PARAM Name="TopBorder" Value=15>
<PARAM Name="BottomBorder" Value=15>
<PARAM Name="GridX" Value=1>
<PARAM Name="GridY" Value=1>
<PARAM Name="SelectionMode" Value=2>
<PARAM Name="ViewGrid" Value=true>
<PARAM Name="src" Value=Models/Rotor2D.3D>
</OBJECT>
<BR><BR>

<INPUT type="button" value="CreateImage" onclick="createImage()">

</BODY>
</HTML>


DXView.CreateMarkup

<HTML>
<HEAD>
<SCRIPT>

function createLine()
{
var line = dxview.CreateMarkup("LineMarkup");
line.Type = 0 //Straight line

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(line);
}

function createEllipse()
{
var shape = dxview.CreateMarkup("ShapeMarkup");
shape.Type = 1 //Ellipse

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(shape);
}

function createText()
{
var text = dxview.CreateMarkup("TextMarkup");
text.SetFont("courier new", 32, 0);
text.SetAutoCompleteText("Enter text");

// Add the markup to the current doc
var cdoc = dxview.GetCurrentPageNumber();
var doc = dxview.Pages.Item(cdoc);
doc.Markups.Add(text);
}
</SCRIPT>
</HEAD>

<BODY>
<OBJECT
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
id="dxview"
border="1"
height="500"
width="500">
<PARAM Name="BorderWidth" Value=0>
<PARAM Name="PageWidth" Value=100.0>
<PARAM Name="PageHeight" Value=150.0>
<PARAM Name="PageDpi" Value=150.0>
<PARAM Name="LeftBorder" Value=10>
<PARAM Name="RightBorder" Value=10>
<PARAM Name="TopBorder" Value=15>
<PARAM Name="BottomBorder" Value=15>
<PARAM Name="GridX" Value=1>
<PARAM Name="GridY" Value=1>
<PARAM Name="SelectionMode" Value=2>
<PARAM Name="ViewGrid" Value=true>
<PARAM Name="src" Value=Models/Rotor2D.3D>
</OBJECT>
<BR>

<INPUT type="button" name="" value="Add Line" onclick="createLine()" />
<INPUT type="button" name="" value="Add Ellipse Markup" onclick="createEllipse()" />
<INPUT type="button" name="" value="Add Text Markup" onclick="createText()" />

</BODY>
</HTML>


DXView.CreatePage

<HTML>
<HEAD>
<SCRIPT>
function addAPage()
{
dxview.SetUnitName("Inches");
dxview.PageWidth = 8.5;
dxview.PageHeight = 11.0;

// Create a new page and add it to the page collection
var page = dxview.CreatePage();
dxview.Pages.Add( page );
dxview.DisplayPageNumber(dxview.Pages.Count);

// Add the page number as a text markup
var num = dxview.GetCurrentPageNumber();
var text = dxview.CreateMarkup("TextMarkup");
text.SetFont("courier new", 72, 2);
text.SetText("Page " + num);
text.SetPosition(50,150);
page.Markups.Add(text);
}

function goToPage()
{
var pagenum = parseInt(prompt("Enter page number",""));

var cancel = isNaN(pagenum); // determines whether Cancel was clicked

if( !cancel ){
if (pagenum > dxview.Pages.Count){
alert("No such page");
}else if(pagenum <= 0){
alert("No such page");
}else{
dxview.DisplayPageNumber(pagenum);
}
}
}

function clearDoc()
{
dxview.ClearDocument();
}
</SCRIPT>
</HEAD>

<BODY>
<OBJECT
id="dxview"
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
height="500"
width="500">
</OBJECT>
<BR>

<INPUT type="button" value="Add A Page" onclick="addAPage()">
<INPUT type="button" value="Go To Page" onclick="goToPage()">
<INPUT type="button" value="Clear Document" onclick="clearDoc()">
</BODY>
</HTML>


DXView.CreateXViewSnapshot

<HTML>
<BODY>

XView3D:
<BR>
<OBJECT
classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
id="XV"
width="320"
height="240">
<PARAM Name="ModelName" Value="Models/FlangedSupport.3D">
</OBJECT>

<BR><BR>

DXView:
<BR>
<OBJECT
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
id="DXV"
width="320"
height="240">
</OBJECT>

<BR><BR>
<INPUT type="button" value="Take a Snapshot!" onclick="Snapshot();">

<SCRIPT LANGUAGE="JScript">
function Snapshot()
{
// Take the snapshot
var drawing = DXV.CreateXViewSnapshot(XV,"");

// Make a page for it
DXV.SetUnitName("Inches");
DXV.PageDpi = 600;
DXV.PageWidth = drawing.Width;
DXV.PageHeight = drawing.Height;

page = DXV.CreatePage();
DXV.Pages.Add( page );
DXV.DisplayPageNumber(DXV.Pages.Count);

// Add it to the page
page.Drawings.Add(drawing);
}
</SCRIPT>

</BODY>
</HTML>


DXView.DisplayPageNumber

<HTML>
<HEAD>
<SCRIPT>
function addAPage()
{
dxview.SetUnitName("Inches");
dxview.PageWidth = 8.5;
dxview.PageHeight = 11.0;

// Create a new page and add it to the page collection
var page = dxview.CreatePage();
dxview.Pages.Add( page );
dxview.DisplayPageNumber(dxview.Pages.Count);

// Add the page number as a text markup
var num = dxview.GetCurrentPageNumber();
var text = dxview.CreateMarkup("TextMarkup");
text.SetFont("courier new", 72, 2);
text.SetText("Page " + num);
text.SetPosition(50,150);
page.Markups.Add(text);
}

function goToPage()
{
var pagenum = parseInt(prompt("Enter page number",""));

if (pagenum > dxview.Pages.Count){
alert("No such page");
}else if(pagenum <= 0){
alert("No such page");
}else{
dxview.DisplayPageNumber(pagenum);
}
}

function clearDoc()
{
dxview.ClearDocument();
}
</SCRIPT>
</HEAD>

<BODY>
<OBJECT
id="dxview"
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
height="500"
width="500">
</OBJECT>
<BR>

<INPUT type="button" value="Add A Page" onclick="addAPage()">
<INPUT type="button" value="Go To Page" onclick="goToPage()">
<INPUT type="button" value="Clear Document" onclick="clearDoc()">
</BODY>
</HTML>


DXView.GetCurrentPageNumber

<HTML>
<HEAD>
<SCRIPT>
function addAPage()
{
dxview.SetUnitName("Inches");
dxview.PageWidth = 8.5;
dxview.PageHeight = 11.0;

// Create a new page and add it to the page collection
var page = dxview.CreatePage();
dxview.Pages.Add( page );
dxview.DisplayPageNumber(dxview.Pages.Count);

// Add the page number as a text markup
var num = dxview.GetCurrentPageNumber();
var text = dxview.CreateMarkup("TextMarkup");
text.SetFont("courier new", 72, 2);
text.SetText("Page " + num);
text.SetPosition(50,150);
page.Markups.Add(text);
}

function goToPage()
{
var pagenum = parseInt(prompt("Enter page number",""));

if (pagenum > dxview.Pages.Count){
alert("No such page");
}else if(pagenum <= 0){
alert("No such page");
}else{
dxview.DisplayPageNumber(pagenum);
}
}

function clearDoc()
{
dxview.ClearDocument();
}
</SCRIPT>
</HEAD>

<BODY>
<OBJECT
id="dxview"
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
height="500"
width="500">
</OBJECT>
<BR>

<INPUT type="button" value="Add A Page" onclick="addAPage()">
<INPUT type="button" value="Go To Page" onclick="goToPage()">
<INPUT type="button" value="Clear Document" onclick="clearDoc()">
</BODY>
</HTML>


DXView.GetMouseAction

<HTML>
<HEAD></HEAD>
<BODY>

<OBJECT
id="DXV"
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
height="500"
width="500">
<PARAM name="src" value="Models/Rotor2D.3D">
</OBJECT>
<BR>

<INPUT type="button" value="Pan" onclick="DXV.SetMouseAction('PAN')">
<INPUT type="button" value="Zoom" onclick="DXV.SetMouseAction('ZOOM')">
<INPUT type="button" value="Rotate" onclick="DXV.SetMouseAction('ROTATE')">
<BR>
<INPUT type="button" value="Get Mouse Action" onclick="alert(DXV.GetMouseAction())">

</BODY>
</HTML>


DXView.Rotate

<HTML>
<HEAD>
<SCRIPT>
function rotate90()
{
dxview.Rotate(90);
dxview.Refresh(); //necessary for the rotation to be immediately visible
}
</SCRIPT>
</HEAD>

<BODY>

<OBJECT
id="dxview"
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
height="500"
width="500">
<PARAM name="src" value="Models/Rotor2D.3D">
</OBJECT>
<BR>

<INPUT type="button" value="Rotate 90 Degrees" onclick="rotate90()">

</BODY>
</HTML>


DXView.SelectionModeChanged Event

<HTML>
<HEAD>

<SCRIPT>
function selectMode(num)
{
dxview.SelectionMode = num;
}
</SCRIPT>
</HEAD>

<BODY>

<OBJECT
id="dxview"
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
height="500"
width="500">
<PARAM name="src" value="Models/Rotor2D.3D" />
</OBJECT>
<BR>

<INPUT type="button" value="Page Mode" onclick="selectMode(0)">
<INPUT type="button" value="Drawing Mode" onclick="selectMode(1)">
<INPUT type="button" value="Markups Mode" onclick="selectMode(2)">

<!-- EVENTS -->
<SCRIPT
language="JScript"
FOR="dxview"
EVENT="SelectionModeChanged(smode)">

alert("SelectMode changed: " + smode);

</SCRIPT>

</BODY>
</HTML>


DXView.SetMouseAction

<HTML>
<HEAD></HEAD>
<BODY>

<OBJECT
id="DXV"
classid="CLSID:D7AE6EB2-E7A6-41B2-AC85-0F5A2B2AF041"
height="500"
width="500">
<PARAM name="src" value="Models/Rotor2D.3D">
</OBJECT>
<BR>

<INPUT type="button" value="Pan" onclick="DXV.SetMouseAction('PAN')">
<INPUT type="button" value="Zoom" onclick="DXV.SetMouseAction('ZOOM')">
<INPUT type="button" value="Rotate" onclick="DXV.SetMouseAction('ROTATE')">
<BR>
<INPUT type="button" value="Get Mouse Action" onclick="alert(DXV.GetMouseAction())">

</BODY>
</HTML>


DXView.Start

ClientCLSID = "{########-####-####-####-############}"
OEMCode = "##########"

DXV.Start ClientCLSID, OEMCode ____________//start control


GetLastError() Reference

 SFMake3D API Reference
String GetLastError

Description:
    Returns the last error occurred in the component.
Input Parameters:

Return Value:
    A string containing a description of the last error occurred.

See also:

©2001 Actify Corporation. All Rights reserved worldwide. Actify and SpinFire are trademarks of Actify. All other brand and product names may be trademarks or registered trademarks of their respective owners.


SpinFirePro.HomeComponent class

Represents the Home component in SpinFire Professional.


HomeComponent.DoCommand function

Commands

    HomeComponent.DoCommand can accept the commands listed below. A command's parameters, if any, are listed beneath the command.

    Commands are case-sensitive and can be called from either this component or from the application object.
    RefreshServers - Refresh the list of servers on the Home Page.


SFProItemType enumeration

Describes the type of item inside an XView3D or DXView document.

ItemType Values
Constant | Value | Description
sfUnknownItemType | 0 | Unknown type
sfXViewPartType | 1 | Part of a 3D model. (See SF_Node.)
sfXViewMarkupType | 2 | 3D markup label
sfXViewReferenceFrameType | 3 | 3D Reference Frame
sfDXViewDrawingType | 4 | Drawing in a 2D document.
sfDXViewMarkupType | 5 | Redlining markup in a 2D document.
sfDXViewLayerType | 6 | Layer in a 3D document.
sfXViewFrameType | 7 | Reference frame in a 3D document. (See SF_ReferenceFrame.)
sfXViewViewportType | 8 | Viewport in a 3D document.


SpinFirePro.LibraryComponent class

Represents the Library component in SpinFire Professional.


MarkupNote Reference

 SFMake3D API Reference
Bool Make3DFromFile String geoFile
String out3DFile
Bool silent
Bool computeLOD
Bool preserveExt

Description:
    Create a new 3D file from a native geometry file using an available importer.
Input Parameters:
    geoFile | file to be converted into .3D format
out3DFile | output 3D filename
silent | TRUE no output will appear on the screen, FALSE dialog boxes and progress bar will appear on screen
computeLOD | TRUE if Levels Of Detail are desired in the resulting 3D file, FALSE otherwise
preserveExt | TRUE if the original file extension should be built into the resulting file name, FALSE otherwise.

Return Value:
    TRUE if the creation of the 3D file has been successful, FALSE otherwise.
    Call GetLastError() to get the error type if return value is FALSE.

See also:
  • The AddFileTo3D() function.

©2000 Actify Corporation. All Rights reserved worldwide. Actify and SpinFire are trademarks of Actify. All other brand and product names may be trademarks or registered trademarks of their respective owners.


Markup2PtDraftAngle.GetType Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup Type" onclick="MarkupGetType();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 2PtDraftAngle markup
____noteMarkup = XV.SceneCreateMarkup("2PtDraftAngle");
________// sets first point
____noteMarkup.SetFirstPoint(26.317, 50.987, 50.000);
________// sets second point
____noteMarkup.SetSecondPoint(2.650, -4.165, 50.000);
________// sets position of the markup
____noteMarkup.SetPosition(40.0, 20.0, 55.0);
________// set markup to stay on top
____noteMarkup.StayFront = true;
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupGetType()
{
____noteType = noteMarkup.GetType();
____alert("Markup type is: " + noteType);
}
</SCRIPT>
</BODY>
</HTML>


Markup2PtDraftAngle.GetXML Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup XML" onclick="MarkupGetXML();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 2PtDraftAngle markup
____noteMarkup = XV.SceneCreateMarkup("2PtDraftAngle");
________// sets first point
____noteMarkup.SetFirstPoint(26.317, 50.987, 50.000);
________// sets second point
____noteMarkup.SetSecondPoint(2.650, -4.165, 50.000);
________// sets position of the markup
____noteMarkup.SetPosition(40.0, 20.0, 55.0);
________// set markup to stay on top
____noteMarkup.StayFront = true;
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupGetXML()
{
____noteXML = noteMarkup.GetXML();
____alert(noteXML);
}
</SCRIPT>
</BODY>
</HTML>


Markup2PtDraftAngle.SetDirection Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Change Direction" onclick="ChangeDir();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 2PtDraftAngle markup
____noteMarkup = XV.SceneCreateMarkup("2PtDraftAngle");

________// sets first point
____noteMarkup.SetFirstPoint(26.317, 50.987, 50.000);
________// sets second point
____noteMarkup.SetSecondPoint(2.650, -4.165, 50.000);
________// sets direction
____noteMarkup.SetDirection("X");

________// sets position of the markup
____noteMarkup.SetPosition(40.0, 20.0, 55.0);
________// set markup to stay on top
____noteMarkup.StayFront = true;
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}
function ChangeDir()
{
________// set direction
____noteMarkup.SetDirection("Y");
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


Markup2PtDraftAngle.SetFirstPoint Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 2PtDraftAngle markup
____noteMarkup = XV.SceneCreateMarkup("2PtDraftAngle");
________// sets first point
____noteMarkup.SetFirstPoint(26.317, 50.987, 50.000);
________// sets second point
____noteMarkup.SetSecondPoint(2.650, -4.165, 50.000);
________// sets position of the markup
____noteMarkup.SetPosition(40.0, 20.0, 55.0);
________// set markup to stay on top
____noteMarkup.StayFront = true;
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

</SCRIPT>
</BODY>
</HTML>


Markup2PtDraftAngle.SetPosition Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Move Markup" onclick="MoveMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 2PtDraftAngle markup
____noteMarkup = XV.SceneCreateMarkup("2PtDraftAngle");
________// sets first point
____noteMarkup.SetFirstPoint(26.317, 50.987, 50.000);
________// sets second point
____noteMarkup.SetSecondPoint(2.650, -4.165, 50.000);
________// sets position of the markup
____noteMarkup.SetPosition(40.0, 20.0, 55.0);
________// set markup to stay on top
____noteMarkup.StayFront = true;
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MoveMarkup()
{
____noteMarkup.SetPosition(-10.0, 20.0, 55.0);
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


Markup2PtDraftAngle.SetSecondPoint Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 2PtDraftAngle markup
____noteMarkup = XV.SceneCreateMarkup("2PtDraftAngle");
________// sets first point
____noteMarkup.SetFirstPoint(26.317, 50.987, 50.000);
________// sets second point
____noteMarkup.SetSecondPoint(2.650, -4.165, 50.000);
________// sets position of the markup
____noteMarkup.SetPosition(40.0, 20.0, 55.0);
________// set markup to stay on top
____noteMarkup.StayFront = true;
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

</SCRIPT>
</BODY>
</HTML>


Markup3PtAngle.GetType Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup Type" onclick="MarkupGetType();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 3PtAngle markup
____noteMarkup = XV.SceneCreateMarkup("3PtAngle");
________// sets first point
____noteMarkup.SetFirstPoint(32.555, 52.078, 50.000);
________// sets second point
____noteMarkup.SetSecondPoint(-24.014, 3.510, 50.000);
________// sets vertex
____noteMarkup.SetVertexPoint(32.555, 3.510, 50.000)
________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupGetType()
{
____noteType = noteMarkup.GetType();
____alert("Markup type is: " + noteType);
}
</SCRIPT>
</BODY>
</HTML>


Markup3PtAngle.GetXML Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup XML" onclick="MarkupGetXML();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 3PtAngle markup
____noteMarkup = XV.SceneCreateMarkup("3PtAngle");
________// sets first point
____noteMarkup.SetFirstPoint(32.555, 52.078, 50.000);
________// sets second point
____noteMarkup.SetSecondPoint(-24.014, 3.510, 50.000);
________// sets vertex
____noteMarkup.SetVertexPoint(32.555, 3.510, 50.000)
________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupGetXML()
{
____noteXML = noteMarkup.GetXML();
____alert(noteXML);
}
</SCRIPT>
</BODY>
</HTML>


NewScene

HREF( [in out, retval] BSTR *pVal );

Description:

Specifies the URL used as link for the markup.

Input Parameters:

pVal : string containing the URL to be used as link for the markup.

Return Value:

pVal : string containing the URL to be used as link for the markup.

See also:

OtherMethods

Return To Index


Markup3PtAngle.SetFirstPoint Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 3PtAngle markup
____noteMarkup = XV.SceneCreateMarkup("3PtAngle");

________// sets first point
____noteMarkup.SetFirstPoint(32.555, 52.078, 50.000);
________// sets second point
____noteMarkup.SetSecondPoint(-24.014, 3.510, 50.000);
________// sets vertex
____noteMarkup.SetVertexPoint(32.555, 3.510, 50.000)

________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}
</SCRIPT>
</BODY>
</HTML>


Markup3PtAngle.SetPosition Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Move Markup" onclick="MoveMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 3PtAngle markup
____noteMarkup = XV.SceneCreateMarkup("3PtAngle");
________// sets first point
____noteMarkup.SetFirstPoint(32.555, 52.078, 50.000);
________// sets second point
____noteMarkup.SetSecondPoint(-24.014, 3.510, 50.000);
________// sets vertex
____noteMarkup.SetVertexPoint(32.555, 3.510, 50.000)
________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MoveMarkup()
{
____noteMarkup.SetPosition(50.0, 20.0, 55.0);
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


Markup3PtAngle.SetSecondPoint Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 3PtAngle markup
____noteMarkup = XV.SceneCreateMarkup("3PtAngle");

________// sets first point
____noteMarkup.SetFirstPoint(32.555, 52.078, 50.000);
________// sets second point
____noteMarkup.SetSecondPoint(-24.014, 3.510, 50.000);
________// sets vertex
____noteMarkup.SetVertexPoint(32.555, 3.510, 50.000)

________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}
</SCRIPT>
</BODY>
</HTML>


Markup3PtAngle.SetVertexPoint Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 3PtAngle markup
____noteMarkup = XV.SceneCreateMarkup("3PtAngle");

________// sets first point
____noteMarkup.SetFirstPoint(32.555, 52.078, 50.000);
________// sets second point
____noteMarkup.SetSecondPoint(-24.014, 3.510, 50.000);
________// sets vertex
____noteMarkup.SetVertexPoint(32.555, 3.510, 50.000)

________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}
</SCRIPT>
</BODY>
</HTML>


Markup3PtCircle.GetType Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup Type" onclick="MarkupGetType();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 3PtCircle markup
____noteMarkup = XV.SceneCreateMarkup("3PtCircle");
________// sets first point
____noteMarkup.SetPoint1(2.650, -4.165, 50.000);
________// sets second point
____noteMarkup.SetPoint2(26.317, 4.600, 50.000);
________// sets third point
____noteMarkup.SetPoint3(36.270, 27.794, 50.000)
________// sets position of the markup
____noteMarkup.SetPosition(-10.0, -30.0, 55.000);
________// make markup stay always on top
____noteMarkup.StayFront = "True";
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupGetType()
{
____noteType = noteMarkup.GetType();
____alert("Markup type is: " + noteType);
}
</SCRIPT>
</BODY>
</HTML>


Markup3PtCircle.GetXML Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup XML" onclick="MarkupGetXML();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 3PtCircle markup
____noteMarkup = XV.SceneCreateMarkup("3PtCircle");
________// sets first point
____noteMarkup.SetPoint1(2.650, -4.165, 50.000);
________// sets second point
____noteMarkup.SetPoint2(26.317, 4.600, 50.000);
________// sets third point
____noteMarkup.SetPoint3(36.270, 27.794, 50.000)
________// sets position of the markup
____noteMarkup.SetPosition(-10.0, -30.0, 55.000);
________// make markup stay always on top
____noteMarkup.StayFront = "True";
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupGetXML()
{
____noteXML = noteMarkup.GetXML();
____alert(noteXML);
}
</SCRIPT>
</BODY>
</HTML>


Markup3PtCircle.GetXML Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 3PtCircle markup
____noteMarkup = XV.SceneCreateMarkup("3PtCircle");

________// sets first point
____noteMarkup.SetPoint1(2.650, -4.165, 50.000);
________// sets second point
____noteMarkup.SetPoint2(26.317, 4.600, 50.000);
________// sets third point
____noteMarkup.SetPoint3(36.270, 27.794, 50.000)

________// sets position of the markup
____noteMarkup.SetPosition(-10.0, -30.0, 55.000);
________// make markup stay always on top
____noteMarkup.StayFront = "True";
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}
</SCRIPT>
</BODY>
</HTML>


Markup3PtCircle.SetPosition Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Move Markup" onclick="MoveMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a 3PtCircle markup
____noteMarkup = XV.SceneCreateMarkup("3PtCircle");
________// sets first point
____noteMarkup.SetPoint1(2.650, -4.165, 50.000);
________// sets second point
____noteMarkup.SetPoint2(26.317, 4.600, 50.000);
________// sets third point
____noteMarkup.SetPoint3(36.270, 27.794, 50.000)
________// sets position of the markup
____noteMarkup.SetPosition(-10.0, -30.0, 55.000);
________// make markup stay always on top
____noteMarkup.StayFront = "True";
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MoveMarkup()
{
____noteMarkup.SetPosition(25.0, 50.0, 55.000);
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MarkupBoundBox.GetType Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup Type" onclick="MarkupGetType();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a BoundBox markup
____noteMarkup = XV.SceneCreateMarkup("BoundBox");
________// get the root node of the model
____modelNode = XV.SceneGetRootNode();
________// and attach bound box to the node
____noteMarkup.SetNode(modelNode);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupGetType()
{
____noteType = noteMarkup.GetType();
____alert("Note type is: " + noteType);
}
</SCRIPT>
</BODY>
</HTML>


MarkupBoundBox.GetXML Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup XML" onclick="MarkupGetXML();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a BoundBox markup
____noteMarkup = XV.SceneCreateMarkup("BoundBox");
________// get the root node of the model
____modelNode = XV.SceneGetRootNode();
________// and attach bound box to the node
____noteMarkup.SetNode(modelNode);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupGetXML()
{
____noteXML = noteMarkup.GetXML();
____alert(noteXML);
}
</SCRIPT>
</BODY>
</HTML>


MarkupBoundBox.LoadXML Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Load Markup XML" onclick="MarkupLoadXML();">
<INPUT type="button" value="Get Markup XML" onclick="MarkupGetXML();">

<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____// create a BoundBox markup
____noteMarkup = XV.SceneCreateMarkup("BoundBox");
____// get the root node of the model
____modelNode = XV.SceneGetRootNode();
____// and attach bound box to the node
____noteMarkup.SetNode(modelNode);
____// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupLoadXML()
{
____code = "<sf:MARKUP " +
____"xmlns:sf=\"http://www.actify.com/namespaces/SpinFire\" "+
____"TYPE=\"BoundBox\" " +
____"ID=\"userid\" " +
____"STAYFRONT=\"True\" " +
____"LOCKPOSITION=\"true\" " +
____"VISIBLE=\"True\" " +
____"TRANSPARENCY=\"0.5\" " +
____"UNITS=\"mm\"> " +
____"<sf:COLOR LABEL=\"0.502 0.471 0.353\" /> " +
____"<sf:GEOMETRY>/</sf:GEOMETRY> " +
____"<sf:MINPOINT>-60.730 -47.206 0.000</sf:MINPOINT> " +
____"<sf:MAXPOINT>69.270 72.794 50.000</sf:MAXPOINT> " +
____"<sf:POSITIONX>4.270 -47.206 -17.692</sf:POSITIONX> " +
____"<sf:POSITIONY>82.270 12.794 0.000</sf:POSITIONY> " +
____"<sf:POSITIONZ>-73.730 -47.206 25.000</sf:POSITIONZ> " +
____"</sf:MARKUP>";

____noteMarkup.LoadXML(code);

}
function MarkupGetXML()
{
____alert(noteMarkup.GetXML());
}
</SCRIPT>
</BODY>
</HTML>


MarkupBoundBox.SetNode Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a BoundBox markup
____noteMarkup = XV.SceneCreateMarkup("BoundBox");

________// get the root node of the model
____modelNode = XV.SceneGetRootNode();

________// and attach bound box to the node
____noteMarkup.SetNode(modelNode);

________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

</SCRIPT>
</BODY>
</HTML>


Markup.Delete Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();">
<INPUT type="button" value="Set Without Point" onclick="SetWithoutPoint();">
<INPUT type="button" value="Get System ID" onclick="GetSystemID();">
<INPUT type="button" value="Delete Markup" onclick="Delete();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function SetWithoutPoint()
{
____noteMarkup.SetWithoutPoint("True");
____XV.Refresh();
}
function GetSystemID()
{
____alert('Markup SystemID: ' + noteMarkup.GetSystemID());
}
function Delete()
{
____noteMarkup.Delete();
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MarkupDistance.GetType Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup Type" onclick="MarkupGetType();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a Distance markup
____noteMarkup = XV.SceneCreateMarkup("Distance");
________// sets point A
____noteMarkup.SetFirstPoint(-39.73, 27.794, 49.732);
________// sets point B
____noteMarkup.SetSecondPoint(47.27, 27.794, 50.00);
________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupGetType()
{
____noteType = noteMarkup.GetType();
____alert("Note type is: " + noteType);
}
</SCRIPT>
</BODY>
</HTML>


MarkupDistance.GetXML Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup XML" onclick="MarkupGetXML();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a Distance markup
____noteMarkup = XV.SceneCreateMarkup("Distance");
________// sets point A
____noteMarkup.SetFirstPoint(-39.73, 27.794, 49.732);
________// sets point B
____noteMarkup.SetSecondPoint(47.27, 27.794, 50.00);
________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupGetXML()
{
____noteXML = noteMarkup.GetXML();
____alert(noteXML);
}
</SCRIPT>
</BODY>
</HTML>


MarkupDistance.SetFirstPoint Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a Distance markup
____noteMarkup = XV.SceneCreateMarkup("Distance");

________// sets first point
____noteMarkup.SetFirstPoint(-39.73, 27.794, 49.732);
________// sets second point
____noteMarkup.SetSecondPoint(47.27, 27.794, 50.00);

________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}
</SCRIPT>
</BODY>
</HTML>


MarkupDistance.SetPosition Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Move Markup" onclick="MoveMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a Distance markup
____noteMarkup = XV.SceneCreateMarkup("Distance");

________// sets first point
____noteMarkup.SetFirstPoint(-39.73, 27.794, 49.732);
________// sets second point
____noteMarkup.SetSecondPoint(47.27, 27.794, 50.00);

________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MoveMarkup()
{
____noteMarkup.SetPosition(50.0, 20.0, 55.0);
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MarkupDistance.SetSecondPoint Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create a Distance markup
____noteMarkup = XV.SceneCreateMarkup("Distance");

________// sets first point
____noteMarkup.SetFirstPoint(-39.73, 27.794, 49.732);
________// sets second point
____noteMarkup.SetSecondPoint(47.27, 27.794, 50.00);

________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}
</SCRIPT>
</BODY>
</HTML>


Markup.GetSystemID Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();">
<INPUT type="button" value="Set Without Point" onclick="SetWithoutPoint();">
<INPUT type="button" value="Get System ID" onclick="GetSystemID();">
<INPUT type="button" value="Delete Markup" onclick="Delete();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function SetWithoutPoint()
{
____noteMarkup.SetWithoutPoint("True");
____XV.Refresh();
}
function GetSystemID()
{
____alert('Markup SystemID: ' + noteMarkup.GetSystemID());
}
function Delete()
{
____noteMarkup.Delete();
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MarkupMassProperties.GetType Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup Type" onclick="MarkupGetType();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____________// create a MassProperties markup
____noteMarkup = XV.SceneCreateMarkup("MassProperties");
____________// sets initial position for the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____________// get root node of the model
____modelNode = XV.SceneGetRootNode();
____________// attach MassProperty markup to model
____noteMarkup.SetNode(modelNode);
____________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupGetType()
{
____noteType = noteMarkup.GetType();
____alert("Note type is: " + noteType);
}
</SCRIPT>
</BODY>
</HTML>


MarkupMassProperties.GetXML Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup XML" onclick="GetMarkupXML();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____________// create a MassProperties markup
____noteMarkup = XV.SceneCreateMarkup("MassProperties");
____________// sets initial position for the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____________// get root node of the model
____modelNode = XV.SceneGetRootNode();
____________// attach MassProperty markup to model
____noteMarkup.SetNode(modelNode);
____________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function GetMarkupXML()
{
____noteXML = noteMarkup.GetXML();
____alert(noteXML);
}
</SCRIPT>
</BODY>
</HTML>


MarkupMassProperties.SetNode Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____________// create a MassProperties markup
____noteMarkup = XV.SceneCreateMarkup("MassProperties");
____________// sets initial position for the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____________// get root node of the model
____modelNode = XV.SceneGetRootNode();

____________// attach MassProperty markup to model
____noteMarkup.SetNode(modelNode);

____________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

</SCRIPT>
</BODY>
</HTML>


MarkupMassProperties.SetPosition Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Move Markup" onclick="MoveMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____________// create a MassProperties markup
____noteMarkup = XV.SceneCreateMarkup("MassProperties");
____________// sets initial position for the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____________// get root node of the model
____modelNode = XV.SceneGetRootNode();
____________// attach MassProperty markup to model
____noteMarkup.SetNode(modelNode);
____________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MoveMarkup()
{
____noteMarkup.SetPosition(50.0, 20.0, 55.0);
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MarkupNote2D.GetType Reference

<HTML>
<BODY>
<INPUT type="button" value="Add 2D Note" onclick="AddMarkup();">
<INPUT type="button" value="Get Note Type" onclick="NoteGetType();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note2D");
____noteMarkup.SetPosition(0.8, 0.8);
____noteMarkup.SetText("2D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function NoteGetType()
{
____noteType = noteMarkup.GetType();
____alert("Note type is: " + noteType);
}
</SCRIPT>
</BODY>
</HTML>


MarkupNote2D.GetXML Reference

<HTML>
<BODY>
<INPUT type="button" value="Add 2D Note" onclick="AddMarkup();">
<INPUT type="button" value="Get Note XML" onclick="GetNoteXML();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note2D");
____noteMarkup.SetPosition(0.8, 0.8);
____noteMarkup.SetText("2D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function GetNoteXML()
{
____noteXML = noteMarkup.GetXML();
____alert(noteXML);
}
</SCRIPT>
</BODY>
</HTML>


MarkupNote2D.SetPosition Reference

<HTML>
<BODY>
<INPUT type="button" value="Add 2D Note" onclick="AddMarkup();">
<INPUT type="button" value="Move Note Lable" onclick="MoveLable();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note2D");
____noteMarkup.SetPosition(0.8, 0.8);
____noteMarkup.SetText("2D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function MoveLable()
{
____noteMarkup.SetPosition(0.2, 0.8);
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MarkupNote2D.SetText Reference

<HTML>
<BODY>
<INPUT type="button" value="Add 2D Note" onclick="AddMarkup();">
<INPUT type="button" value="Change Note Text" onclick="ChangeNoteText();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note2D");
____noteMarkup.SetPosition(0.8, 0.8);
____noteMarkup.SetText("2D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function ChangeNoteText()
{
____noteMarkup.SetText("New Text");
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MarkupNote.GetType Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();">
<INPUT type="button" value="Get Note Type" onclick="NoteGetType();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function NoteGetType()
{
____noteType = noteMarkup.GetType();
____alert("Note type is: " + noteType);
}
</SCRIPT>
</BODY>
</HTML>


MarkupNote.GetXML Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();">
<INPUT type="button" value="Get Note XML" onclick="GetNoteXML();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function GetNoteXML()
{
____noteXML = noteMarkup.GetXML();
____alert(noteXML);
}
</SCRIPT>
</BODY>
</HTML>


MarkupNote.SetPoint Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();">
<INPUT type="button" value="Move Note Point" onclick="MovePoint();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function MovePoint()
{
____noteMarkup.SetPoint(-24.0, 0.0, 50.0);
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MarkupNote.SetPosition Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();">
<INPUT type="button" value="Move Note Lable" onclick="MoveLable();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function MoveLable()
{
____noteMarkup.SetPosition(50.0, 20.0, 55.0);
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MarkupNote.SetText Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();">
<INPUT type="button" value="Change Note Text" onclick="ChangeNoteText();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function ChangeNoteText()
{
____noteMarkup.SetText("New Text");
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MarkupNote.SetWithoutPoint Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();">
<INPUT type="button" value="Set Without Point" onclick="SetWithoutPoint();">
<INPUT type="button" value="Get System ID" onclick="GetSystemID();">
<INPUT type="button" value="Delete Markup" onclick="Delete();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function SetWithoutPoint()
{
____noteMarkup.SetWithoutPoint("True");
____XV.Refresh();
}
function GetSystemID()
{
____alert('Markup SystemID: ' + noteMarkup.GetSystemID());
}
function Delete()
{
____noteMarkup.Delete();
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


All Markup.SetColor Reference

            <HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();"> <INPUT
            type="button" value="Change Note Color" onclick="ChangeNoteColor();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function ChangeNoteColor()
{
____noteMarkup.SetColor(0.0,0.5,0.5);
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MarkupVertex.GetType Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup Type" onclick="MarkupGetType();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create Vertex markup
____noteMarkup = XV.SceneCreateMarkup("Vertex");
________// set arrowhead point
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MarkupGetType()
{
____noteType = noteMarkup.GetType();
____alert("Markup type is: " + noteType);
}
</SCRIPT>
</BODY>
</HTML>


MarkupVertex.GetXML Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Get Markup XML" onclick="GetMarkupXML();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create Vertex markup
____noteMarkup = XV.SceneCreateMarkup("Vertex");
________// set arrowhead point
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function GetMarkupXML()
{
____noteXML = noteMarkup.GetXML();
____alert(noteXML);
}
</SCRIPT>
</BODY>
</HTML>


MarkupVertex.SetPoint Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Move Vertex Point" onclick="MovePoint();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create Vertex markup
____noteMarkup = XV.SceneCreateMarkup("Vertex");

________// set arrowhead point
____noteMarkup.SetPoint(32.0, 0.0, 50.0);

________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MovePoint()
{
____noteMarkup.SetPoint(-24.0, 0.0, 50.0);
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MarkupVertex.SetPosition Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Markup" onclick="AddMarkup();">
<INPUT type="button" value="Move Markup" onclick="MoveMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
________// create Vertex markup
____noteMarkup = XV.SceneCreateMarkup("Vertex");
________// set arrowhead point
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
________// sets position of the markup
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
________// insert markup into the scene
____XV.SceneInsertMarkup(noteMarkup);
}

function MoveMarkup()
{
____noteMarkup.SetPosition(50.0, 20.0, 55.0);
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


MenuCommandChange

MenuCommandChange( [ in ] LONG CmdID
                 , [ in ] LONG CmdAttr
                 , [out,retval] LONG* ViewID );

Description:

Change the status of an entry in the command menu. Each item in the menu can be checked or unchecked.

Input Parameters:

CmdID: is the id of the menu item to change

CmdAttr: is the new attribute to set for the item
0 means ITEM UNCHECKED
1 means ITEM CHECKED

Return Value:

ViewID: The function returns the ID of the modified menu entry.
The return value -1 means the operation cannot be completed.

See also:

AddMenuCommand, UserDefinedCmd

Return To Index


Node.GetPropertyText Reference

<HTML>
<BODY>
__<INPUT type="button" value="Hide" onclick="Hide();">
__<INPUT type="button" value="UnHide" onclick="UnHide();">
__<INPUT type="button" value="IsHidden" onclick="IsHidden();">
__<INPUT type="button" value="IsAssembly" onclick="IsAssembly();">
__<INPUT type="button" value="SetDescription" onclick="SetDescription();">
__<INPUT type="button" value="GetDescription" onclick="GetDescription();">
<br>
__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="500"
____width="600">
____<PARAM Name="ModelName" Value="models/Bearing.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function Hide()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
________node.Hide('true');
____}
____function UnHide()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
____node.Hide('false');
____}
____function IsHidden()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
________alert('This node is hidden -> ' + node.IsHidden());
____}
____function IsAssembly() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________alert('This node has child nodes -> ' + node.IsAssembly()); ____} ____function SetDescription() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________node.SetPropertyText('This is a bearing'); ____} ____function GetDescription() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________alert('Description: ' + node.GetPropertyText()); ____} __</SCRIPT>
</BODY>
</HTML>


Node.IsAssembly Reference

<HTML>
<BODY>
__<INPUT type="button" value="Hide" onclick="Hide();">
__<INPUT type="button" value="UnHide" onclick="UnHide();">
__<INPUT type="button" value="IsHidden" onclick="IsHidden();">
__<INPUT type="button" value="IsAssembly" onclick="IsAssembly();">
__<INPUT type="button" value="SetDescription" onclick="SetDescription();">
__<INPUT type="button" value="GetDescription" onclick="GetDescription();">
<br>
__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="500"
____width="600">
____<PARAM Name="ModelName" Value="models/Bearing.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function Hide()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
________node.Hide('true');
____}
____function UnHide()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
____node.Hide('false');
____}
____function IsHidden()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
________alert('This node is hidden -> ' + node.IsHidden());
____}
____function IsAssembly() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________alert('This node has child nodes -> ' + node.IsAssembly()); ____} ____function SetDescription() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________node.SetPropertyText('This is a bearing'); ____} ____function GetDescription() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________alert('Description: ' + node.GetPropertyText()); ____} __</SCRIPT>
</BODY>
</HTML>


Node.IsHidden Reference

<HTML>
<BODY>
__<INPUT type="button" value="Hide" onclick="Hide();">
__<INPUT type="button" value="UnHide" onclick="UnHide();">
__<INPUT type="button" value="IsHidden" onclick="IsHidden();">
__<INPUT type="button" value="IsAssembly" onclick="IsAssembly();">
__<INPUT type="button" value="SetDescription" onclick="SetDescription();">
__<INPUT type="button" value="GetDescription" onclick="GetDescription();">
<br>
__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="500"
____width="600">
____<PARAM Name="ModelName" Value="models/Bearing.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function Hide()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
________node.Hide('true');
____}
____function UnHide()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
____node.Hide('false');
____}
____function IsHidden()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
________alert('This node is hidden -> ' + node.IsHidden());
____}
____function IsAssembly() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________alert('This node has child nodes -> ' + node.IsAssembly()); ____} ____function SetDescription() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________node.SetPropertyText('This is a bearing'); ____} ____function GetDescription() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________alert('Description: ' + node.GetPropertyText()); ____} __</SCRIPT>
</BODY>
</HTML>


Node.GetCenterOfMass Reference

<HTML>
<BODY>
<INPUT type="button" value="Center Of Mass" onclick="CalcCenterOfMass();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/Bearing.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function CalcCenterOfMass()
{
____ModelCenterOfMass = XV.SceneGetRootNode().GetCenterOfMass(1.0);
____alert("Center Of Mass is: " + "\n" +
__________"X: " + ModelCenterOfMass.X + "\n" +
__________"Y: " + ModelCenterOfMass.Y + "\n" +
__________"Z: " + ModelCenterOfMass.Z + "\n" );
}
</SCRIPT>
</BODY>
</HTML>


Node.GetFirstChild Reference

            <HTML>
<BODY>
<INPUT type="button" value="Get First Child of Root Node" onclick="GetFirstChild();">

            <br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/Bearing.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
____function GetFirstChild()
____{
________rootNode = XV.SceneGetRootNode();
________firstChild = rootNode.GetFirstChild();
________alert("First Child: " + firstChild.name);
____}
</SCRIPT>
</BODY>
</HTML>


Node.GetSurfaceArea Reference

<HTML>
<BODY>
<INPUT type="button"
_______value="Get Surface Area"
_______onclick="CalcSurfaceArea();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/Bearing.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function CalcSurfaceArea()
{
____ModelSurface = XV.SceneGetRootNode().GetSurfaceArea();
____alert("Surface Area Is: " + ModelSurface);
}
</SCRIPT>
</BODY>
</HTML>


Node.GetVolume Reference

<HTML>
<BODY>
<INPUT type="button"_value="Get Volume" onclick="GetVolume();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/Bearing.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function GetVolume()
{
____ModelVolume = XV.SceneGetRootNode().GetVolume(1.0);
____alert("Model volume is: " + ModelVolume);
}
</SCRIPT>
</BODY>
</HTML>


Node.Hide Reference

<HTML>
<BODY>
__<INPUT type="button" value="Hide" onclick="Hide();">
__<INPUT type="button" value="UnHide" onclick="UnHide();">
__<INPUT type="button" value="IsHidden" onclick="IsHidden();">
__<INPUT type="button" value="IsAssembly" onclick="IsAssembly();">
__<INPUT type="button" value="SetDescription" onclick="SetDescription();">
__<INPUT type="button" value="GetDescription" onclick="GetDescription();">
<br>
__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="500"
____width="600">
____<PARAM Name="ModelName" Value="models/Bearing.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function Hide()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
________node.Hide('true');
____}
____function UnHide()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
____node.Hide('false');
____}
____function IsHidden()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
________alert('This node is hidden -> ' + node.IsHidden());
____}
____function IsAssembly() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________alert('This node has child nodes -> ' + node.IsAssembly()); ____} ____function SetDescription() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________node.SetPropertyText('This is a bearing'); ____} ____function GetDescription() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________alert('Description: ' + node.GetPropertyText()); ____} __</SCRIPT>
</BODY>
</HTML>


Node.RestoreSavedPosition Reference

<HTML>
<BODY>
<INPUT type="button" value="Transform" onclick="Transform();">
<INPUT type="button" value="SaveCurrentPosition" onclick="SaveCurrentPosition();">
<INPUT type="button" value="RestoreSavedPosition" onclick="RestoreSavedPosition();">

<OBJECT
classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
id="XV"
height="500"
width="600">
<PARAM Name="ModelName" Value="models/Bearing.3D">
<PARAM Name="ReferenceFrame" Value="3">
</OBJECT>

<SCRIPT LANGUAGE="JScript">

var theNode = null;

function Transform()
{
if(theNode==null)
{
theNode = XV.SceneGetRootNode().GetFirstChild();
}

rf = XV.ReferenceFrames.Item(1);
theNode.RelTranslate(0.0, 0.0, 10.0, rf);
}

function SaveCurrentPosition()
{
if(theNode==null)
{
theNode = XV.SceneGetRootNode().GetFirstChild();
}

theNode.SaveCurrentPosition();
}

function RestoreSavedPosition()
{
if(theNode==null)
{
theNode = XV.SceneGetRootNode().GetFirstChild();
}

theNode.RestoreSavedPosition();
XV.Refresh();
}

</SCRIPT>
</BODY>
</HTML>


SF_Node.SaveCurrentPosition Reference

<HTML>
<BODY>
<INPUT type="button" value="Transform" onclick="Transform();">
<INPUT type="button" value="SaveCurrentPosition" onclick="SaveCurrentPosition();">
<INPUT type="button" value="RestoreSavedPosition" onclick="RestoreSavedPosition();">

<OBJECT
classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
id="XV"
height="500"
width="600">
<PARAM Name="ModelName" Value="models/Bearing.3D">
<PARAM Name="ReferenceFrame" Value="3">
</OBJECT>

<SCRIPT LANGUAGE="JScript">

var theNode = null;

function Transform()
{
if(theNode==null)
{
theNode = XV.SceneGetRootNode().GetFirstChild();
}

rf = XV.ReferenceFrames.Item(1);
theNode.RelTranslate(0.0, 0.0, 10.0, rf);
}

function SaveCurrentPosition()
{
if(theNode==null)
{
theNode = XV.SceneGetRootNode().GetFirstChild();
}

theNode.SaveCurrentPosition();
}

function RestoreSavedPosition()
{
if(theNode==null)
{
theNode = XV.SceneGetRootNode().GetFirstChild();
}

theNode.RestoreSavedPosition();
XV.Refresh();
}

</SCRIPT>
</BODY>
</HTML>


Node.SetPropertyText Reference

<HTML>
<BODY>
__<INPUT type="button" value="Hide" onclick="Hide();">
__<INPUT type="button" value="UnHide" onclick="UnHide();">
__<INPUT type="button" value="IsHidden" onclick="IsHidden();">
__<INPUT type="button" value="IsAssembly" onclick="IsAssembly();">
__<INPUT type="button" value="SetDescription" onclick="SetDescription();">
__<INPUT type="button" value="GetDescription" onclick="GetDescription();">
<br>
__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="500"
____width="600">
____<PARAM Name="ModelName" Value="models/Bearing.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function Hide()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
________node.Hide('true');
____}
____function UnHide()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
____node.Hide('false');
____}
____function IsHidden()
____{
________node = XV.SceneGetRootNode().GetFirstChild();
________alert('This node is hidden -> ' + node.IsHidden());
____}
____function IsAssembly() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________alert('This node has child nodes -> ' + node.IsAssembly()); ____} ____function SetDescription() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________node.SetPropertyText('This is a bearing'); ____} ____function GetDescription() ____{ ________node = XV.SceneGetRootNode().GetFirstChild(); ________alert('Description: ' + node.GetPropertyText()); ____} __</SCRIPT>
</BODY>
</HTML>


SF_NodeType enumeration

SF_NodeType Values
Type | Value | Description
sfAssembly | 0 | Assembly
sfPartinstace | 1 | Instance of a part
sfTriangleMesh | 2 | Triangle mesh
sfPolyline | 3 | Polyline
sfPointset | 4 | Pointset
sfNodeTypeError | 100 | Error in the node type


SpinFirePro.OptionsComponent class

Represents the Options component in SpinFire Professional.


OptionsComponent.DoCommand function

Commands

    HomeComponent.DoCommand can accept the commands listed below. A command's parameters, if any, are listed beneath the command.

    Commands are case-sensitive and can be called from either this component or from the application object.
    GoControlCenter - Goes to the Main Options page.
    GoViewerOptions - Goes to the Viewer Options page.
    GoConfiguration - Goes to the Configuration page.
    GoInternetActivation - Goes to the Internet Activation page.
    GoManualActivation - Goes to the Manual Activation page.
    GoAssociationsOptions - Goes to the Associations page.


SpinFirePro.Application.FirstDocument

<HTML>
<BODY>
<OBJECT
____classid="CLSID:B5805FAB-FDB6-425C-9076-260430E189E6"
____id="SFR"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="Models/Multidoc.3D">
</OBJECT>

<INPUT type="button" value="First Document" onclick="SFR.FirstDocument()">
<INPUT type="button" value="Prev Document" onclick="SFR.PrevDocument()">
<INPUT type="button" value="Next Document" onclick="SFR.NextDocument()">
<INPUT type="button" value="Last Document" onclick="SFR.LastDocument()">

</BODY>
</HTML>


SpinFirePro.Application.GetDocument function

<HTML>
<BODY>
<OBJECT
____classid="CLSID:B5805FAB-FDB6-425C-9076-260430E189E6"
____id="SFR"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="Models/Multidoc">
</OBJECT>

<INPUT type="button" value="Get a Document Name" onclick="getDocName()">

<SCRIPT LANGUAGE="JScript">
function getDocName()
{
var count = SFR.Workspace.Documents.Count;
var msg = "Enter document index (1-" +count+ ")";
var index = parseInt( prompt(msg,'') );

var cancel = isNaN(index); // determines whether Cancel was clicked

if( !cancel ){
//test whether the index is too large or small
if( (index <= 0) || (index > count) ){
alert("Enter a number between 1 and " + count);
}else{
var doc = SFR.GetDocument(index);
alert("Document Name: " + doc.Name);
}
}
</SCRIPT>
</BODY>
</HTML>


SpinFirePro.Application.GotoDocument function

<HTML>
<BODY>
<br>
<OBJECT
____classid="CLSID:B5805FAB-FDB6-425C-9076-260430E189E6"
____id="SFR"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="Models/Multidoc.3D">
</OBJECT>

<INPUT type="button" value=" To 'Bearing'" onclick="SFR.GotoDocument('Bearing')">
<br>
<INPUT type="button" value="Go To Index" onclick="goToIndex()">
<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
var msg = 'Enter the index number of the document. (1-4)';
var index = parseInt( prompt(msg,'') );
SFR.GotoDocument(index); //index starts at 1
}
</SCRIPT>
</BODY>
</HTML>


SpinFirePro.Application.LastDocument function

<HTML>
<BODY>
<OBJECT
____classid="CLSID:B5805FAB-FDB6-425C-9076-260430E189E6"
____id="SFR"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="Models/Multidoc.3D">
</OBJECT>

<INPUT type="button" value="First Document" onclick="SFR.FirstDocument()">
<INPUT type="button" value="Prev Document" onclick="SFR.PrevDocument()">
<INPUT type="button" value="Next Document" onclick="SFR.NextDocument()">
<INPUT type="button" value="Last Document" onclick="SFR.LastDocument()">

</BODY>
</HTML>


SpinFirePro.Application.NextDocument function

<HTML>
<BODY>
<OBJECT
____classid="CLSID:B5805FAB-FDB6-425C-9076-260430E189E6"
____id="SFR"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="Models/Multidoc.3D">
</OBJECT>

<INPUT type="button" value="First Document" onclick="SFR.FirstDocument()">
<INPUT type="button" value="Prev Document" onclick="SFR.PrevDocument()">
<INPUT type="button" value="Next Document" onclick="SFR.NextDocument()">
<INPUT type="button" value="Last Document" onclick="SFR.LastDocument()">

</BODY>
</HTML>


SpinFirePro.Application.PrevDocument function

<HTML>
<BODY>
<OBJECT
____classid="CLSID:B5805FAB-FDB6-425C-9076-260430E189E6"
____id="SFR"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="Models/Multidoc.3D">
</OBJECT>

<INPUT type="button" value="First Document" onclick="SFR.FirstDocument()">
<INPUT type="button" value="Prev Document" onclick="SFR.PrevDocument()">
<INPUT type="button" value="Next Document" onclick="SFR.NextDocument()">
<INPUT type="button" value="Last Document" onclick="SFR.LastDocument()">

</BODY>
</HTML>


Actify.Reader API Reference

The main control for the SpinFire Reader. The Actify.Reader object provides access to the WorkSpace of a .3D file. The WorkSpace contains all the documents inside a .3D file.

The Actify.Reader control can also display toolbars that give access to commands for working with 3D and 2D documents.

If using Actify.Reader within an application, the Start function must be called before any of the functions can be used. If using Actify.Reader within a web page, the Start function does not need to be called.


Actify.Reader.Start

ClientCLSID = "{########-####-####-####-############}"
OEMCode = "##########"

SFR.Start ClientCLSID, OEMCode ____________//start control


ReferenceFrame.Focus Reference

<HTML>
<HEAD>
<!-- Event Handler for Point Picking -->
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
var lastpick = XV.PickGetPoint();
var refA = XV.CreateReferenceFrame();
var worldrf = XV.ReferenceFrames.GetFromUserID("WR");

refA.SetOrigin(lastpick, worldrf);
XV.ReferenceFrames.Add(refA);
refA.Active = true;

XV.PickingType('NONE');
XV.Refresh();
</SCRIPT>
</HEAD>

<BODY>

<INPUT type="button" value="Add RF" onclick="AddRF();">
<INPUT type="button" value="InScene" onclick="InScene();">
<INPUT type="button" value="Focus on RF" onclick="Focus();">
<INPUT type="button" value="RF XML" onclick="ShowXML();">
<INPUT type="button" value="RF Origin" onclick="GetRFOrigin();">
<BR>

<OBJECT
classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
id="XV"
height="400"
width="500">
<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
<!-- This Param is needed to make the Reference Frames visible -->
<PARAM NAME="ReferenceFrame" VALUE="24" />
</OBJECT>

<SCRIPT LANGUAGE="JScript">

//Adds a Reference Frame
function AddRF()
{
alert("Pick the origin point of the Reference Frame");
XV.PickingType('POINTS');
}

//Indicates whether the active RF is in the scene
function InScene(){
var actRF = XV.ReferenceFrames.GetActive();
alert("InScene = " + actRF.InScene);
}

//Focuses on the active RF
function Focus(){
var actRF = XV.ReferenceFrames.GetActive();
actRF.Focus();
}

//Displays the XML for the active RF
function ShowXML(){
var text = XV.ReferenceFrames.GetActive().GetTxtXMLFragment();
alert(text);
}

//Displays the origin point coordinates of the active RF
function GetRFOrigin(){
var actref = XV.ReferenceFrames.GetActive();
var wref = XV.ReferenceFrames.GetFromUserID("WR");
var org_point = actref.GetOrigin(wref);
alert("Origin: " + org_point.x + ", " + org_point.y+ ", " + org_point.z);
}
</SCRIPT>

</BODY>
</HTML>


ReferenceFrame.GetOrigin

<HTML>
<HEAD>
<!-- Event Handler for Point Picking -->
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
var lastpick = XV.PickGetPoint();
var refA = XV.CreateReferenceFrame();
var worldrf = XV.ReferenceFrames.GetFromUserID("WR");

refA.SetOrigin(lastpick, worldrf);
XV.ReferenceFrames.Add(refA);
refA.Active = true;

XV.PickingType('NONE');
XV.Refresh();
</SCRIPT>
</HEAD>

<BODY>

<INPUT type="button" value="Add RF" onclick="AddRF();">
<INPUT type="button" value="InScene" onclick="InScene();">
<INPUT type="button" value="Focus on RF" onclick="Focus();">
<INPUT type="button" value="RF XML" onclick="ShowXML();">
<INPUT type="button" value="RF Origin" onclick="GetRFOrigin();">
<BR>

<OBJECT
classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
id="XV"
height="400"
width="500">
<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
<!-- This Param is needed to make the Reference Frames visible -->
<PARAM NAME="ReferenceFrame" VALUE="24" />
</OBJECT>

<SCRIPT LANGUAGE="JScript">

//Adds a Reference Frame
function AddRF()
{
alert("Pick the origin point of the Reference Frame");
XV.PickingType('POINTS');
}

//Indicates whether the active RF is in the scene
function InScene(){
var actRF = XV.ReferenceFrames.GetActive();
alert("InScene = " + actRF.InScene);
}

//Focuses on the active RF
function Focus(){
var actRF = XV.ReferenceFrames.GetActive();
actRF.Focus();
}

//Displays the XML for the active RF
function ShowXML(){
var text = XV.ReferenceFrames.GetActive().GetTxtXMLFragment();
alert(text);
}

//Displays the origin point coordinates of the active RF
function GetRFOrigin(){
var actref = XV.ReferenceFrames.GetActive();
var wref = XV.ReferenceFrames.GetFromUserID("WR");
var org_point = actref.GetOrigin(wref);
alert("Origin: " + org_point.x + ", " + org_point.y+ ", " + org_point.z);
}
</SCRIPT>

</BODY>
</HTML>


ReferenceFrame.GetTxtXMLFragment Reference

<HTML>
<HEAD>
<!-- Event Handler for Point Picking -->
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
var lastpick = XV.PickGetPoint();
var refA = XV.CreateReferenceFrame();
var worldrf = XV.ReferenceFrames.GetFromUserID("WR");

refA.SetOrigin(lastpick, worldrf);
XV.ReferenceFrames.Add(refA);
refA.Active = true;

XV.PickingType('NONE');
XV.Refresh();
</SCRIPT>
</HEAD>

<BODY>

<INPUT type="button" value="Add RF" onclick="AddRF();">
<INPUT type="button" value="InScene" onclick="InScene();">
<INPUT type="button" value="Focus on RF" onclick="Focus();">
<INPUT type="button" value="RF XML" onclick="ShowXML();">
<INPUT type="button" value="RF Origin" onclick="GetRFOrigin();">
<BR>

<OBJECT
classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
id="XV"
height="400"
width="500">
<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
<!-- This Param is needed to make the Reference Frames visible -->
<PARAM NAME="ReferenceFrame" VALUE="24" />
</OBJECT>

<SCRIPT LANGUAGE="JScript">

//Adds a Reference Frame
function AddRF()
{
alert("Pick the origin point of the Reference Frame");
XV.PickingType('POINTS');
}

//Indicates whether the active RF is in the scene
function InScene(){
var actRF = XV.ReferenceFrames.GetActive();
alert("InScene = " + actRF.InScene);
}

//Focuses on the active RF
function Focus(){
var actRF = XV.ReferenceFrames.GetActive();
actRF.Focus();
}

//Displays the XML for the active RF
function ShowXML(){
var text = XV.ReferenceFrames.GetActive().GetTxtXMLFragment();
alert(text);
}

//Displays the origin point coordinates of the active RF
function GetRFOrigin(){
var actref = XV.ReferenceFrames.GetActive();
var wref = XV.ReferenceFrames.GetFromUserID("WR");
var org_point = actref.GetOrigin(wref);
alert("Origin: " + org_point.x + ", " + org_point.y+ ", " + org_point.z);
}
</SCRIPT>

</BODY>
</HTML>


ReferenceFrames.Add

<HTML>
<HEAD>
<!-- Event Handler for Point Picking -->
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
var lastpick = XV.PickGetPoint();
var refA = XV.CreateReferenceFrame();
var worldrf = XV.ReferenceFrames.GetFromUserID("WR");

refA.SetOrigin(lastpick, worldrf);
XV.ReferenceFrames.Add(refA);
refA.Active = true;

XV.PickingType('NONE');
XV.Refresh();
</SCRIPT>
</HEAD>

<BODY>

<INPUT type="button" value="Add RF" onclick="AddRF();">
<INPUT type="button" value="InScene" onclick="InScene();">
<INPUT type="button" value="Focus on RF" onclick="Focus();">
<INPUT type="button" value="RF XML" onclick="ShowXML();">
<INPUT type="button" value="RF Origin" onclick="GetRFOrigin();">
<BR>

<OBJECT
classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
id="XV"
height="400"
width="500">
<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
<!-- This Param is needed to make the Reference Frames visible -->
<PARAM NAME="ReferenceFrame" VALUE="24" />
</OBJECT>

<SCRIPT LANGUAGE="JScript">

//Adds a Reference Frame
function AddRF()
{
alert("Pick the origin point of the Reference Frame");
XV.PickingType('POINTS');
}

//Indicates whether the active RF is in the scene
function InScene(){
var actRF = XV.ReferenceFrames.GetActive();
alert("InScene = " + actRF.InScene);
}

//Focuses on the active RF
function Focus(){
var actRF = XV.ReferenceFrames.GetActive();
actRF.Focus();
}

//Displays the XML for the active RF
function ShowXML(){
var text = XV.ReferenceFrames.GetActive().GetTxtXMLFragment();
alert(text);
}

//Displays the origin point coordinates of the active RF
function GetRFOrigin(){
var actref = XV.ReferenceFrames.GetActive();
var wref = XV.ReferenceFrames.GetFromUserID("WR");
var org_point = actref.GetOrigin(wref);
alert("Origin: " + org_point.x + ", " + org_point.y+ ", " + org_point.z);
}
</SCRIPT>

</BODY>
</HTML>


ReferenceFrame.SetOrigin Reference

<HTML>
<HEAD>
<!-- Event Handler for Point Picking -->
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
var lastpick = XV.PickGetPoint();
var refA = XV.CreateReferenceFrame();
var worldrf = XV.ReferenceFrames.GetFromUserID("WR");

refA.SetOrigin(lastpick, worldrf);
XV.ReferenceFrames.Add(refA);
refA.Active = true;

XV.PickingType('NONE');
XV.Refresh();
</SCRIPT>
</HEAD>

<BODY>

<INPUT type="button" value="Add RF" onclick="AddRF();">
<INPUT type="button" value="InScene" onclick="InScene();">
<INPUT type="button" value="Focus on RF" onclick="Focus();">
<INPUT type="button" value="RF XML" onclick="ShowXML();">
<INPUT type="button" value="RF Origin" onclick="GetRFOrigin();">
<BR>

<OBJECT
classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
id="XV"
height="400"
width="500">
<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
<!-- This Param is needed to make the Reference Frames visible -->
<PARAM NAME="ReferenceFrame" VALUE="24" />
</OBJECT>

<SCRIPT LANGUAGE="JScript">

//Adds a Reference Frame
function AddRF()
{
alert("Pick the origin point of the Reference Frame");
XV.PickingType('POINTS');
}

//Indicates whether the active RF is in the scene
function InScene(){
var actRF = XV.ReferenceFrames.GetActive();
alert("InScene = " + actRF.InScene);
}

//Focuses on the active RF
function Focus(){
var actRF = XV.ReferenceFrames.GetActive();
actRF.Focus();
}

//Displays the XML for the active RF
function ShowXML(){
var text = XV.ReferenceFrames.GetActive().GetTxtXMLFragment();
alert(text);
}

//Displays the origin point coordinates of the active RF
function GetRFOrigin(){
var actref = XV.ReferenceFrames.GetActive();
var wref = XV.ReferenceFrames.GetFromUserID("WR");
var org_point = actref.GetOrigin(wref);
alert("Origin: " + org_point.x + ", " + org_point.y+ ", " + org_point.z);
}
</SCRIPT>

</BODY>
</HTML>


ReferenceFrames.GetActive Reference

<HTML>
<HEAD>
<!-- Event Handler for Point Picking -->
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
var lastpick = XV.PickGetPoint();
var refA = XV.CreateReferenceFrame();
var worldrf = XV.ReferenceFrames.GetFromUserID("WR");

refA.SetOrigin(lastpick, worldrf);
XV.ReferenceFrames.Add(refA);
refA.Active = true;

XV.PickingType('NONE');
XV.Refresh();
</SCRIPT>
</HEAD>

<BODY>

<INPUT type="button" value="Add RF" onclick="AddRF();">
<INPUT type="button" value="InScene" onclick="InScene();">
<INPUT type="button" value="Focus on RF" onclick="Focus();">
<INPUT type="button" value="RF XML" onclick="ShowXML();">
<INPUT type="button" value="RF Origin" onclick="GetRFOrigin();">
<BR>

<OBJECT
classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
id="XV"
height="400"
width="500">
<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
<!-- This Param is needed to make the Reference Frames visible -->
<PARAM NAME="ReferenceFrame" VALUE="24" />
</OBJECT>

<SCRIPT LANGUAGE="JScript">

//Adds a Reference Frame
function AddRF()
{
alert("Pick the origin point of the Reference Frame");
XV.PickingType('POINTS');
}

//Indicates whether the active RF is in the scene
function InScene(){
var actRF = XV.ReferenceFrames.GetActive();
alert("InScene = " + actRF.InScene);
}

//Focuses on the active RF
function Focus(){
var actRF = XV.ReferenceFrames.GetActive();
actRF.Focus();
}

//Displays the XML for the active RF
function ShowXML(){
var text = XV.ReferenceFrames.GetActive().GetTxtXMLFragment();
alert(text);
}

//Displays the origin point coordinates of the active RF
function GetRFOrigin(){
var actref = XV.ReferenceFrames.GetActive();
var wref = XV.ReferenceFrames.GetFromUserID("WR");
var org_point = actref.GetOrigin(wref);
alert("Origin: " + org_point.x + ", " + org_point.y+ ", " + org_point.z);
}
</SCRIPT>

</BODY>
</HTML>


ReferenceFrames.GetFromUserID Reference

<HTML>
<HEAD>
<!-- Event Handler for Point Picking -->
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
var lastpick = XV.PickGetPoint();
var refA = XV.CreateReferenceFrame();
var worldrf = XV.ReferenceFrames.GetFromUserID("WR");

refA.SetOrigin(lastpick, worldrf);
XV.ReferenceFrames.Add(refA);
refA.Active = true;

XV.PickingType('NONE');
XV.Refresh();
</SCRIPT>
</HEAD>

<BODY>

<INPUT type="button" value="Add RF" onclick="AddRF();">
<INPUT type="button" value="InScene" onclick="InScene();">
<INPUT type="button" value="Focus on RF" onclick="Focus();">
<INPUT type="button" value="RF XML" onclick="ShowXML();">
<INPUT type="button" value="RF Origin" onclick="GetRFOrigin();">
<BR>

<OBJECT
classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
id="XV"
height="400"
width="500">
<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
<!-- This Param is needed to make the Reference Frames visible -->
<PARAM NAME="ReferenceFrame" VALUE="24" />
</OBJECT>

<SCRIPT LANGUAGE="JScript">

//Adds a Reference Frame
function AddRF()
{
alert("Pick the origin point of the Reference Frame");
XV.PickingType('POINTS');
}

//Indicates whether the active RF is in the scene
function InScene(){
var actRF = XV.ReferenceFrames.GetActive();
alert("InScene = " + actRF.InScene);
}

//Focuses on the active RF
function Focus(){
var actRF = XV.ReferenceFrames.GetActive();
actRF.Focus();
}

//Displays the XML for the active RF
function ShowXML(){
var text = XV.ReferenceFrames.GetActive().GetTxtXMLFragment();
alert(text);
}

//Displays the origin point coordinates of the active RF
function GetRFOrigin(){
var actref = XV.ReferenceFrames.GetActive();
var wref = XV.ReferenceFrames.GetFromUserID("WR");
var org_point = actref.GetOrigin(wref);
alert("Origin: " + org_point.x + ", " + org_point.y+ ", " + org_point.z);
}
</SCRIPT>

</BODY>
</HTML>


SaveFlags enumeration

Options for the Save() and SaveAs() methods.

SaveFlags Values
Constant | Value | Description
sfSaveNoFlags | 0x0000 (0) | No flags.
sfSaveOverwrite | 0x0001 (1) | Automatically overwrites an existing file with the same name.
sfSaveDontPrompt | 0x0002 (2) | Will not prompt the user if the file saved has the same name as an existing file.
sfSaveShowDialog | 0x0004 (4) | Opens the "Save As" dialog box, allowing the user to choose the path and filename of the saved file.
sfSaveNoChanges | 0x0008 (8) | Does not save changes in memory. Used with SaveAs() to save a remote file to a local folder.


SF_SelectionMode enumeration

Determined whether parts or surfaces may be selected in the 3D scene.

SF_SelectionMode Values
Type | Value | Description
sfParts | 0 | Allows parts to be picked.
sfPartElements | 1 | Allows surfaces, pointsets, or polylines to be picked.


SF_ProjectionMode enumeration

Describes the projection angle

ItemType Values
Constant | Value | Description
sfFirstAngle | 1 | First angle projection
sfThirdAngle | 3 | Third angle projection


SFButtonStyle enumeration

Indicates whether the button will contain an icon, a text caption, or both.

SFButtonStyles Values
Constant | Value | Description
sfStyleButtonDefault | 0 | Default button style
sfStyleButtonCaption | 1 | Text caption
sfStyleButtonIcon | 2 | Icon
sfStyleButtonCaptionAndIcon | 3 | Both text caption and button


SFControlType enumeration

Describes the type of a control.

ItemType Values
Constant | Value | Description
sfControlTypeButton | 1 | A button control
sfControlTypePopup | 2 | A popup control.


SpinFirePro.ViewerComponent class

Represents the Viewer component in SpinFire Professional.


ViewerComponent.DoCommand function

Commands

    HomeComponent.DoCommand can accept the commands listed below. A command's parameters, if any, are listed beneath the command.

    Commands are case-sensitive and can be called from either this component or from the application object.
    PrintFile - Prints a file.
  • parameters:
  • pathname - The path and name of the file to be printed.


SF_VisibilityStatus enumeration

Indicates the visibiliy of node.

SF_VisibilityStatus Values
Type | Value | Description
sfVisible | 0 | Node is visible.
sfHidden | 1 | Node is not visible.
sfPartialVisibility | 2 | Some child nodes are visible, others are hidden.


SF_XSectionStatus enumeration

Indicates whether the cross-section will cut through the material of the geometry.

SF_XSectionStatus Values
Type | Value | Description
sfMaterialCut | 0 | The cross-section cuts through the material. The geometry will be invisible on one side of the cross-section plane and visible on the other.
sfMaterialShown | 1 | No cut is made in the geometry. All of the geometry is visible.
sfPartial | 2 | Some parts of the assembly are cut and some are not.


XTPButtonStyle enumeration

ItemType Values
Constant | Value | Description
xtpButtonAutomatic | 0 |
xtpButtonCaption | 1 |
xtpButtonIcon | 2 |
xtpButtonIconAndCaption | 3 |


AddMenuCommand Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Menu Item" onclick="AddMenuItem();"><br>

__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function AddMenuItem()
____{
__________// adds new unchecked item to right click menu
______XV.AddMenuCommand("New Item", 0);
____}
__</SCRIPT>
</BODY>
</HTML>


Actify.XView3D.CreateReferenceFrame Reference

<HTML>
<HEAD>
<!-- Event Handler for Point Picking -->
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
var lastpick = XV.PickGetPoint();
var refA = XV.CreateReferenceFrame();
var worldrf = XV.ReferenceFrames.GetFromUserID("WR");

refA.SetOrigin(lastpick, worldrf);
XV.ReferenceFrames.Add(refA);
refA.Active = true;

XV.PickingType('NONE');
XV.Refresh();
</SCRIPT>
</HEAD>

<BODY>

<INPUT type="button" value="Add RF" onclick="AddRF();">
<INPUT type="button" value="InScene" onclick="InScene();">
<INPUT type="button" value="Focus on RF" onclick="Focus();">
<INPUT type="button" value="RF XML" onclick="ShowXML();">
<INPUT type="button" value="RF Origin" onclick="GetRFOrigin();">
<BR>

<OBJECT
classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
id="XV"
height="400"
width="500">
<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
<!-- This Param is needed to make the Reference Frames visible -->
<PARAM NAME="ReferenceFrame" VALUE="24" />
</OBJECT>

<SCRIPT LANGUAGE="JScript">

//Adds a Reference Frame
function AddRF()
{
alert("Pick the origin point of the Reference Frame");
XV.PickingType('POINTS');
}

//Indicates whether the active RF is in the scene
function InScene(){
var actRF = XV.ReferenceFrames.GetActive();
alert("InScene = " + actRF.InScene);
}

//Focuses on the active RF
function Focus(){
var actRF = XV.ReferenceFrames.GetActive();
actRF.Focus();
}

//Displays the XML for the active RF
function ShowXML(){
var text = XV.ReferenceFrames.GetActive().GetTxtXMLFragment();
alert(text);
}

//Displays the origin point coordinates of the active RF
function GetRFOrigin(){
var actref = XV.ReferenceFrames.GetActive();
var wref = XV.ReferenceFrames.GetFromUserID("WR");
var org_point = actref.GetOrigin(wref);
alert("Origin: " + org_point.x + ", " + org_point.y+ ", " + org_point.z);
}
</SCRIPT>

</BODY>
</HTML>


EnableDisplay Reference

<HTML>
<BODY>
__<INPUT type="button" value="Display Enable" onclick="Enable();">
__<INPUT type="button" value="Display Disable" onclick="Disable();">
<br>
__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function Enable()
____{
______XV.EnableDisplay("true");
____}
____function Disable()
____{
______XV.EnableDisplay("false")
____}
__</SCRIPT>
</BODY>
</HTML>


Event Reference

Capturing Events in Microsoft Internet Explorer

The SpinFire Viewer plug-in for Microsoft Internet Explorer (IE) is an ActiveX control. Internet Explorer allows JavaScript and VBScript to directly access methods, properties and events of an ActiveX control. The following HTML snippet shows the syntax to capture a SpinFire event within IE:

            <SCRIPT LANGUAGE="JScript" FOR="SFview"
EVENT="ImportModelCompleted()">

/* put your code here */

</SCRIPT>

<OBJECT
Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
Id="SFview">
<PARAM NAME="ModelName"
            VALUE="myPart.3D">
</OBJECT>

Please note that the current version of SpinFire does not support the advanced Internet Explorer syntax to capture events. The following code will not work:

<SCRIPT LANGUAGE="JScript">

SFview.ImportModelCompleted = function()
{
// code here will never be executed
}

</SCRIPT>

Note: Only the Microsoft Internet Explorer browser is currently supported.


GetBuild Reference

<HTML>
<BODY>
<INPUT type="button" value="Get Build" onclick="GetBuild();"><br>

__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function GetBuild()
____{
__________// get and display current build number of the control
______alert( XV.GetBuild() );
____}
__</SCRIPT>
</BODY>
</HTML>


GetFirstViewport Reference

 Actify.XView3D API Reference
Int GetFirstViewport

Description:
    Retrieve the first view port available to the ActiveX control. The ID returned allows query via the other viewport functions.
Input Parameters:

Return Value:
    The function return a ViewportID as the ID of the retrieved viewport. The function returns the value -1 if no viewport is retrieved.

See also:
  • The GetNextViewport to retrieve the others viewport available.

©2000 Actify Corporation. All Rights reserved worldwide. Actify and SpinFire are trademarks of Actify. All other brand and product names may be trademarks or registered trademarks of their respective owners.


GetNextViewport Reference

 Actify.XView3D API Reference
Int GetNextViewport

Description:
    Retrieve the next viewport available to the ActiveX control. The ID returned allows query via the other viewport functions. Note: This function must be called after calling GetFirstViewport()at least once.
Input Parameters:

Return Value:
    The function return a ViewportID as the ID of the retrieved viewport. The function returns the value -1 if no viewport is retrieved.

See also:
  • The GetFirstViewport to retrieve the first viewport available.

©2000 Actify Corporation. All Rights reserved worldwide. Actify and SpinFire are trademarks of Actify. All other brand and product names may be trademarks or registered trademarks of their respective owners.


GetXMLScene Reference

<HTML>
<BODY>
<INPUT type="button" value="Get Scene XML" onclick="GetXML();"><br>

__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function GetXML()
____{
__________// gets xml description of the scene
______xmlvar = XV.GetXMLScene();
______alert( xmlvar.xml );
____}
__</SCRIPT>
</BODY>
</HTML>


ImporterGetFirstExtension Reference

 Actify.XView3D API Reference
String ImporterGetFirstExtension Int ImporterID

Description:
    Return the first file extension supported by a given importer.
    Each importer has a list of extension for the files it can load into the SpinFire Viewer.
    Call the ImporterGetFirstExtension() function after this function to scan the others available extensions for thr given importer.
Input Parameters:
    ImporterID | Is the id of the requested importer extension.

Return Value:
    Returns a string containing the extension in the form of ".###".
    The function returns an empty string if there are no extensions for the given importer.

See also:
  • The ImporterGetNextExtension() function used to scan the remaining extension available for the given importer.
  • The GetFirstImporter(), GetNextImporter() functions used to scan the available importers.

©2000 Actify Corporation. All Rights reserved worldwide. Actify and SpinFire are trademarks of Actify. All other brand and product names may be trademarks or registered trademarks of their respective owners.


ImporterGetName Reference

 Actify.XView3D API Reference
String ImporterGetName Int ImporterID

Description:
    Retrieves the name of a given importer through its ID.
Input Parameters:
    ImporterID | Is the id of the requested importer name.

Return Value:
    Returns a string containing the name of the requested importer.
    The function returns an empty string if the importer ID is not valid and the name cannot be retrieved.

See also:
  • The GetFirstImporter(), GetNextImporter() functions used to scan the available importers.

©2000 Actify Corporation. All Rights reserved worldwide. Actify and SpinFire are trademarks of Actify. All other brand and product names may be trademarks or registered trademarks of their respective owners.


ImporterGetNextExtension Reference

 Actify.XView3D API Reference
String ImporterGetNextExtension Int ImporterID

Description:
    Return the next file extension supported by a given importer.
    Each importer has a list of extension for the files it can load into the SpinFire Viewer.
    Call the ImporterGetFirstExtension() function after this one to scan the others available extensions for thr given importer.

    Note: This function must be called after calling the ImporterGetFirstExtension()
    function with the same ImporterID as first parameter    .
Input Parameters:
    ImporterID | Is the id of the requested importer extension.

Return Value:
    Returns a string containing the extension in the form of ".###".
    The function returns an empty string if there are no extensions for the given importer.

See also:
  • The ImporterGetFirstExtension() function used to scan the remaining extension available for the given importer.
  • The GetFirstImporter(), GetNextImporter() functions used to scan the available importers.

©2000 Actify Corporation. All Rights reserved worldwide. Actify and SpinFire are trademarks of Actify. All other brand and product names may be trademarks or registered trademarks of their respective owners.


IsSpinFast Reference

<HTML>
<BODY>
__<INPUT type="button" value="SpinFast" onclick="SpinFast();">
__<INPUT type="button" value="Is SpinFast enabled" onclick="IsSpinFast();">
<br>
__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function SpinFast()
____{
______XV.SpinFast("true");
____}
____function IsSpinFast()
____{
______alert(XV.IsSpinFast());
____}
__</SCRIPT>
</BODY>
</HTML>


MarkupComplete Reference

        <SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="MarkupComplete(markupObject)">
____alert(markupObject.Text + " modified successfully!");
</SCRIPT>

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();">
        <br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");
____XV.SceneInsertMarkup(noteMarkup);
}
</SCRIPT>
</BODY>
</HTML>


MarkupComplete Reference

<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="MarkupDelete(markupObject)">
____alert("Markup Removed Successfully!");
</SCRIPT>

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();"> <br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("Right Click To Delete");
____XV.SceneInsertMarkup(noteMarkup);
}
</SCRIPT>
</BODY>
</HTML>


MenuEnable Reference

<HTML>
<BODY>
<INPUT type="button" value="Enable Menu" onclick="XV.MenuEnable('True');"><br>
<INPUT type="button" value="DisableMenu" onclick="XV.MenuEnable('False');"><br>

__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function GetBuild()
____{
__________// get and display current build number of the control
______alert( XV.GetBuild() );
____}
__</SCRIPT>
</BODY>
</HTML>


XView3D.Navigate

<HTML>
<Script>
____var pickType=0;
</Script>
<BODY>
<INPUT value="Add View" onclick="AddView();" />
<INPUT type="button" value="Go To New View" onclick="Navigate();" />
<INPUT type="button" value="Go To Reader Webpage" onclick="GoToActify();" />

<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width="600"
____Height="400">
____<PARAM NAME="ModelName" Value="Models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript" >
____var viewName;

____//Creates a new view from the current view
____function AddView()
____{
________viewID = XV.NewView();
________viewName = XV.ViewGetName(viewID);
____}

____//Navigates to the view created with the "Add View" button
____function Navigate()
____{
________var link = "#" + viewName;
________XV.Navigate(link);
____}

____//Example of the Navigate function used to go to a URL
____function GoToActify()
____{
________XV.Navigate("http://www.actify.com/v2/products/SFViewer/");
____}
</SCRIPT>
</BODY>
</HTML>


XView3D.New2ViewsHorizViewport function

            <HTML>
<BODY>
<INPUT type="button" value="New4ViewsViewport"
            onclick="New4ViewsViewport();">
<INPUT type="button" value="New2ViewsHorizViewport"
            onclick="New2ViewsHorizViewport();">
<INPUT type="button" value="New2ViewsVertViewport"
            onclick="New2ViewsVertViewport();">
<INPUT type="button" value="New31ViewsViewport"
            onclick="New31ViewsViewport();">
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width=100%
____Height=100%>
<PARAM Name="ModelName" Value="Models/FlangedSupport.3d"></OBJECT>

<Script>
function New4ViewsViewport()
{
_____// create new layout with 4 viewports
____XV.New4ViewsViewport();
}
function New2ViewsHorizViewport()
{
_____// create new layout with 2 viewports divided horizontally
____XV.New2ViewsHorizViewport();
}
function New2ViewsVertViewport()
{
_____// create new layout with 2 viewports divided vertically
____XV.New2ViewsVertViewport();
}
function New31ViewsViewport()
{
_____// create new layout with 3+1 viewports
____XV.New31ViewsViewport();
}
</Script>
</BODY>
</HTML>


XView3D.New2ViewsVertViewport function

            <HTML>
<BODY>
<INPUT type="button" value="New4ViewsViewport"
            onclick="New4ViewsViewport();">
<INPUT type="button" value="New2ViewsHorizViewport"
            onclick="New2ViewsHorizViewport();">
<INPUT type="button" value="New2ViewsVertViewport"
            onclick="New2ViewsVertViewport();">
<INPUT type="button" value="New31ViewsViewport"
            onclick="New31ViewsViewport();">
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width=100%
____Height=100%>
<PARAM Name="ModelName" Value="Models/FlangedSupport.3d"></OBJECT>

<Script>
function New4ViewsViewport()
{
_____// create new layout with 4 viewports
____XV.New4ViewsViewport();
}
function New2ViewsHorizViewport()
{
_____// create new layout with 2 viewports divided horizontally
____XV.New2ViewsHorizViewport();
}
function New2ViewsVertViewport()
{
_____// create new layout with 2 viewports divided vertically
____XV.New2ViewsVertViewport();
}
function New31ViewsViewport()
{
_____// create new layout with 3+1 viewports
____XV.New31ViewsViewport();
}
</Script>
</BODY>
</HTML>


XView3D.New4ViewsViewport function

            <HTML>
<BODY>
<INPUT type="button" value="New4ViewsViewport"
            onclick="New4ViewsViewport();">
<INPUT type="button" value="New2ViewsHorizViewport"
            onclick="New2ViewsHorizViewport();">
<INPUT type="button" value="New2ViewsVertViewport"
            onclick="New2ViewsVertViewport();">
<INPUT type="button" value="New31ViewsViewport"
            onclick="New31ViewsViewport();">
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width=100%
____Height=100%>
<PARAM Name="ModelName" Value="Models/FlangedSupport.3d"></OBJECT>

<Script>
function New4ViewsViewport()
{
_____// create new layout with 4 viewports
____XV.New4ViewsViewport();
}
function New2ViewsHorizViewport()
{
_____// create new layout with 2 viewports divided horizontally
____XV.New2ViewsHorizViewport();
}
function New2ViewsVertViewport()
{
_____// create new layout with 2 viewports divided vertically
____XV.New2ViewsVertViewport();
}
function New31ViewsViewport()
{
_____// create new layout with 3+1 viewports
____XV.New31ViewsViewport();
}
</Script>
</BODY>
</HTML>


XView3D.New31ViewsViewport function

            <HTML>
<BODY>
<INPUT type="button" value="New4ViewsViewport"
            onclick="New4ViewsViewport();">
<INPUT type="button" value="New2ViewsHorizViewport"
            onclick="New2ViewsHorizViewport();">
<INPUT type="button" value="New2ViewsVertViewport"
            onclick="New2ViewsVertViewport();">
<INPUT type="button" value="New31ViewsViewport"
            onclick="New31ViewsViewport();">
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width=100%
____Height=100%>
<PARAM Name="ModelName" Value="Models/FlangedSupport.3d"></OBJECT>

<Script>
function New4ViewsViewport()
{
_____// create new layout with 4 viewports
____XV.New4ViewsViewport();
}
function New2ViewsHorizViewport()
{
_____// create new layout with 2 viewports divided horizontally
____XV.New2ViewsHorizViewport();
}
function New2ViewsVertViewport()
{
_____// create new layout with 2 viewports divided vertically
____XV.New2ViewsVertViewport();
}
function New31ViewsViewport()
{
_____// create new layout with 3+1 viewports
____XV.New31ViewsViewport();
}
</Script>
</BODY>
</HTML>


Start Reference

<HTML>
<BODY>
<INPUT type="button" value="Clear Scene" onclick="ClearScene();"><br>

__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function ClearScene()
____{
__________// clear current scene
______XV.NewScene();
______XV.Refresh();
____}
__</SCRIPT>
</BODY>
</HTML>


XView3D.NewViewReference function

<HTML>
<BODY>
<INPUT type="button" value="New View" onclick="NewView();">
<OBJECT id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>
<SCRIPT LANGUAGE="JavaScript">
function NewView()
{
____________// create a New View
___________window.view1 = XV.NewView();
___________XV.ViewSetEyePoint(window.view1,150.00,80.30,200.00);
___________XV.ViewApply(window.view1,0);
}
</SCRIPT>
</BODY>
</HTML>


NewViewXML() and NewViewXMLText() Reference

<HTML>
<BODY>
<INPUT type="button" value="NewViewXMLText" onclick="NewViewXMLText();">
<INPUT type="button" value="NewViewXML" onclick="NewViewXML();">
<OBJECT id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function NewViewXMLText()
{
_____// save node XML for NewViewXML function
____node = XV.ViewGetXML(0);
_____// Load XML text fragment
____code = "<sf:PSTATE " +
____"xmlns:sf=\"http://www.actify.com/namespaces/SpinFire\" ID=\"\">"+
____"<sf:CAMERA>" +
____"<sf:PROJ>Perspective</sf:PROJ>" +
____"<sf:TARGET>4.270 12.794 25.000</sf:TARGET>" +
____"<sf:EYE>4.270 194.794 207.000</sf:EYE>" +
____"<sf:VUV>0.000 0.707 -0.707</sf:VUV>" +
____"</sf:CAMERA>" +
____"</sf:PSTATE> "
____view1 = XV.NewViewXMLText(code);
____XV.ViewApply(view1,0);
____alert('Original view saved. Loaded new view from XML text fragment');
}

function NewViewXML()
{
____// Load XML fragment
____view2 = XV.NewViewXML(node);
____XV.ViewApply(view2,0);
____alert('Original view loaded from XML fragment');
}

</SCRIPT>
</BODY>
</HTML>


Open() Reference

<HTML>
<BODY>
<INPUT type="button" value="Open Desktop" onclick="OpenDesktop();"><br>

__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function OpenDesktop()
____{
__________// opens model in desktop view
______XV.Open();
____}
__</SCRIPT>
</BODY>
</HTML>


Pick Reference

<HTML>
<Script>
____var pickType=0;
</Script>
<BODY>
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width="600"
____Height="400">
____<PARAM NAME="ModelName" Value="Models/Plug.3D">
</OBJECT>
<br clear="all">
<BUTTON onclick="XV.PickingType('NONE');pickType=0;">Disable_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('PARTS');pickType=1;">Part_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('POINTS');pickType=2;">Point_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('MARKUP');pickType=3;">Markup_Picking
</BUTTON>
<br clear="all">
<br clear="all">
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
____switch( pickType )
____{
________case 0:
________break;
________case 1:
____________var node = XV.PickGetNode();
____________if (node!=null)
____________{
________________node.Deselect();
________________alert('Picked Node ['+node.Name+']');
____________}
________break;
________case 2:
____________var point = XV.PickGetPoint();
____________if (point!=null)
________________alert('Picked Point ['+point.x+','+point.y+','+point.z+']');
________break;
________case 3:
____________var mk = XV.PickGetMarkup();
____________if (mk!=null)
________________alert('Picked Markup ('+mk.Text+')');
________break;
____}
____XV.PickingType('NONE');
____XV.Refresh();
____pickType=0;
</SCRIPT>
</BODY>
</HTML>

View this example


PickGetArc() Reference

            <HTML>
<Script>
____var pickType=0;
</Script>
<BODY>
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width="600"
____Height="400">
____<PARAM NAME="ModelName" Value="Models/Plug.3D">
</OBJECT>
<br clear="all">
<BUTTON onclick="XV.PickingType('NONE');pickType=0;">Disable_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('PARTS');pickType=1;">Part_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('POINTS');pickType=2;">Point_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('MARKUP');pickType=3;">Markup_Picking
</BUTTON>
<BUTTON
            onclick="XV.PickingType('STRAIGHTEDGES');pickType=3;">Markup_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('ARC');pickType=3;">Markup_Picking
</BUTTON>
<br clear="all">
<br clear="all">
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
____switch( pickType )
____{
________case 0:
________break;
________case 1:
____________var node = XV.PickGetNode();
____________if (node!=null)
____________{
________________node.Deselect();
________________alert('Picked Node ['+node.Name+']');
____________}
________break;
________case 2:
____________var point = XV.PickGetPoint();
____________if (point!=null)
________________alert('Picked Point ['+point.x+','+point.y+','+point.z+']');
________break;
________case 3:
____________var mk = XV.PickGetMarkup();
____________if (mk!=null)
________________alert('Picked Markup ('+mk.Text+')');
________break;
________case 4:
________________alert('Straight edge is selected');
________break;
________case 5:
________________alert('Arc is selected');
________break;
____}
____XV.PickingType('NONE');
____XV.Refresh();
____pickType=0;
</SCRIPT>
</BODY>
</HTML>

View this example


PickGetLastPoint

PickGetLastPoint ( [out] double* X
                 , [out] double* Y
                 , [out] double* Z
                 , [out, retval] LONG *partID );

Description:

Returns the coordinate of the last picked point as well as its ID. The programmer can call this function in response to a Pick event generated by the X-View3D.

Input Parameters:

None

Return Value:

X,Y,Z: are the coordinate of the picked point

PartID is the ID of the point hit

See also:

EnablePicking, ÚPick event

Return To Index


PickGetMarkup() Reference

________<HTML>
________<Script>
____________var pickType=0;
________</Script>
________<BODY>
________<OBJECT
____________Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____________ID="XV"
____________Width="600"
____________Height="400">
____________<PARAM NAME="ModelName" Value="Models/Plug.3D">
</OBJECT>
________<br clear="all">
________<BUTTON onclick="XV.PickingType('NONE');pickType=0;">Disable_Picking
</BUTTON>
________<BUTTON onclick="XV.PickingType('PARTS');pickType=1;">Part_Picking
</BUTTON>
________<BUTTON onclick="XV.PickingType('POINTS');pickType=2;">Point_Picking
</BUTTON>
________<BUTTON onclick="XV.PickingType('MARKUP');pickType=3;">Markup_Picking
</BUTTON>
________<br clear="all">
________<br clear="all">
________<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
____________switch( pickType )
____________{
________________case 0:
________________break;
________________case 1:
____________________var node = XV.PickGetNode();
____________________if (node!=null)
____________________{
________________________node.Deselect();
________________________alert('Picked Node ['+node.Name+']');
____________________}
________________break;
________________case 2:
____________________var point = XV.PickGetPoint();
____________________if (point!=null)
________________________alert('Picked Point ['+point.x+','+point.y+','+point.z+']');
________________break;
________________case 3:
____________________var mk = XV.PickGetMarkup();
____________________if (mk!=null)
________________________alert('Picked Markup ('+mk.Text+')');
________________break;
____________}
____________XV.PickingType('NONE');
____________XV.Refresh();
____________pickType=0;
________</SCRIPT>
________</BODY>
________</HTML>

View this example


PickGetNode() Reference

<HTML>
<Script>
____var pickType=0;
</Script>
<BODY>
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width="600"
____Height="400">
____<PARAM NAME="ModelName" Value="Models/Plug.3D">
</OBJECT>
<br clear="all">
<BUTTON onclick="XV.PickingType('NONE');pickType=0;">Disable_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('PARTS');pickType=1;">Part_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('POINTS');pickType=2;">Point_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('MARKUP');pickType=3;">Markup_Picking
</BUTTON>
<br clear="all">
<br clear="all">
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
____switch( pickType )
____{
________case 0:
________break;
________case 1:
____________var node = XV.PickGetNode();
____________if (node!=null)
____________{
________________node.Deselect();
________________alert('Picked Node ['+node.Name+']');
____________}
________break;
________case 2:
____________var point = XV.PickGetPoint();
____________if (point!=null)
________________alert('Picked Point ['+point.x+','+point.y+','+point.z+']');
________break;
________case 3:
____________var mk = XV.PickGetMarkup();
____________if (mk!=null)
________________alert('Picked Markup ('+mk.Text+')');
________break;
____}
____XV.PickingType('NONE');
____XV.Refresh();
____pickType=0;
</SCRIPT>
</BODY>
</HTML>

View this example


PickGetPoint() Reference

<HTML>
<Script>
____var pickType=0;
</Script>
<BODY>
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width="600"
____Height="400">
____<PARAM NAME="ModelName" Value="Models/Plug.3D">
</OBJECT>
<br clear="all">
<BUTTON onclick="XV.PickingType('NONE');pickType=0;">Disable_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('PARTS');pickType=1;">Part_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('POINTS');pickType=2;">Point_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('MARKUP');pickType=3;">Markup_Picking
</BUTTON>
<br clear="all">
<br clear="all">
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
____switch( pickType )
____{
________case 0:
________break;
________case 1:
____________var node = XV.PickGetNode();
____________if (node!=null)
____________{
________________node.Deselect();
________________alert('Picked Node ['+node.Name+']');
____________}
________break;
________case 2:
____________var point = XV.PickGetPoint();
____________if (point!=null)
________________alert('Picked Point ['+point.x+','+point.y+','+point.z+']');
________break;
________case 3:
____________var mk = XV.PickGetMarkup();
____________if (mk!=null)
________________alert('Picked Markup ('+mk.Text+')');
________break;
____}
____XV.PickingType('NONE');
____XV.Refresh();
____pickType=0;
</SCRIPT>
</BODY>
</HTML>

View this example


PickGetStraightEdge() Reference

            <HTML>
<Script>
____var pickType=0;
</Script>
<BODY>
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width="600"
____Height="400">
____<PARAM NAME="ModelName" Value="Models/Plug.3D">
</OBJECT>
<br clear="all">
<BUTTON onclick="XV.PickingType('NONE');pickType=0;">Disable_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('PARTS');pickType=1;">Part_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('POINTS');pickType=2;">Point_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('MARKUP');pickType=3;">Markup_Picking
</BUTTON>
<BUTTON
            onclick="XV.PickingType('STRAIGHTEDGES');pickType=3;">Markup_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('ARC');pickType=3;">Markup_Picking
</BUTTON>
<br clear="all">
<br clear="all">
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
____switch( pickType )
____{
________case 0:
________break;
________case 1:
____________var node = XV.PickGetNode();
____________if (node!=null)
____________{
________________node.Deselect();
________________alert('Picked Node ['+node.Name+']');
____________}
________break;
________case 2:
____________var point = XV.PickGetPoint();
____________if (point!=null)
________________alert('Picked Point ['+point.x+','+point.y+','+point.z+']');
________break;
________case 3:
____________var mk = XV.PickGetMarkup();
____________if (mk!=null)
________________alert('Picked Markup ('+mk.Text+')');
________break;
________case 4:
________________alert('Straight edge is selected');
________break;
________case 5:
________________alert('Arc is selected');
________break;
____}
____XV.PickingType('NONE');
____XV.Refresh();
____pickType=0;
</SCRIPT>
</BODY>
</HTML>

View this example


PickingType() Reference

            <HTML>
<Script>
____var pickType=0;
</Script>
<BODY>
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width="600"
____Height="400">
____<PARAM NAME="ModelName" Value="Models/Plug.3D">
</OBJECT>
<br clear="all">
<BUTTON onclick="XV.PickingType('NONE');pickType=0;">Disable_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('PARTS');pickType=1;">Part_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('POINTS');pickType=2;">Point_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('MARKUP');pickType=3;">Markup_Picking
</BUTTON>
<BUTTON
            onclick="XV.PickingType('STRAIGHTEDGES');pickType=4;">Edge_Picking
</BUTTON>
<BUTTON onclick="XV.PickingType('ARC');pickType=5;">Arc_Picking
</BUTTON>
<br clear="all">
<br clear="all">
<SCRIPT LANGUAGE="JScript" FOR="XV" EVENT="Pick( entityID )">
____switch( pickType )
____{
________case 0:
________break;
________case 1:
____________var node = XV.PickGetNode();
____________if (node!=null)
____________{
________________node.Deselect();
________________alert('Picked Node ['+node.Name+']');
____________}
________break;
________case 2:
____________var point = XV.PickGetPoint();
____________if (point!=null)
________________alert('Picked Point ['+point.x+','+point.y+','+point.z+']');
________break;
________case 3:
____________var mk = XV.PickGetMarkup();
____________if (mk!=null)
________________alert('Picked Markup ('+mk.Text+')');
________break;
________case 4:
________________alert('Straight edge is selected');
________break;
________case 5:
________________alert('Arc is selected');
________break;
____}
____XV.PickingType('NONE');
____XV.Refresh();
____pickType=0;
</SCRIPT>
</BODY>
</HTML>

View this example


SceneClearMarkup Reference

            <HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();">
<INPUT type="button" value="Remove By ID" onclick="RemoveByID();">
<INPUT type="button" value="Remove By Type"
            onclick="RemoveByType();"><br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.ID = "MyMarkup"; _______________// set markup ID
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function RemoveByID()
{
____countRemoved = XV.SceneClearMarkup("<MyMarkup>");
____alert("Removed " + countRemoved + " markup(s).");
}

function RemoveByType()
{
____countRemoved = XV.SceneClearMarkup("note");
____alert("Removed " + countRemoved + " markup(s).");
}
</SCRIPT>
</BODY>
</HTML>


SceneCreateMarkup Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();"> <br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
_____________// create Note Object
____noteMarkup = XV.SceneCreateMarkup("Note");

_____________// set Note Object parameters
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");

_____________// insert Note Object into the scene
____XV.SceneInsertMarkup(noteMarkup);
}
</SCRIPT>
</BODY>
</HTML>

Run this example

Note

    When using VisualBasic, variables for markup objects must be declared using the MG Type Library and the MGLib namespace. For example:

Dim x As MGLib.SF_MarkupBoundBox


SceneCreateMarkupXML Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____xmlStr = '<MARKUP ' +
____________________'TYPE="note" ' +
____________________'ID="MyNote" ' +
____________________'STAYFRONT="False" ' +
____________________'LOCKPOSITION="False" ' +
____________________'VISIBLE="True" ' +
____________________'TRANSPARENCY="0.000">' +
____________________'<COLOR LABEL="0.502 1.000 0.502"/>' +
____________________'<POINT>32.000 0.000 50.000</POINT>' +
____________________'<POSITION>0.000 20.000 55.000</POSITION>' +
____________________'<TEXT>My Note</TEXT>' +
_______________'</MARKUP>';

________________// create new Markup Object using that XML
____noteMarkup = XV.SceneCreateMarkupXML(xmlStr);
________________// insert new Markup Object into scene
____XV.SceneInsertMarkup(noteMarkup);
}
</SCRIPT>
</BODY>
</HTML>


SceneEMailTo() Reference

<HTML>
<BODY>
<INPUT type="button" value="Send Email" onclick="SendEMail();"><br>

__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function SendEMail()
____{
__________// send email
______XV.SceneEMailTo("");
____}
__</SCRIPT>
</BODY>
</HTML>


SceneEnableXSection Reference

            <HTML>
<BODY>
<INPUT type="button" value="EnableXSection" onclick="EnableXSection();">
<INPUT type="button" value="SetXSectionPos" onclick="SetXSectionPos();">
<INPUT type="button" value="GetXSectionPos" onclick="GetXSectionPos();">
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function EnableXSection()
{
_____________// enable cross section
____XV.SceneEnableXSection("true");
}
function SetXSectionPos()
{
_____________// set cross section position
____XV.SceneSetXSectionPos(40,12,25);
}
function GetXSectionPos()
{
_____________// get cross section position
____xSection = XV.SceneGetXSectionPos();
____alert('cross section position: ' + xSection.X + ' ' + xSection.Y + ' ' +
            xSection.Z);
}
</SCRIPT>
</BODY>
</HTML>


SceneEnableXSectionCapping Reference

            <HTML>
<BODY>
<INPUT type="button" value="EnableXSection" onclick="EnableXSection();">
<INPUT type="button" value="EnableXSectionCapping"
            onclick="EnableXSectionCapping();">
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function EnableXSection()
{
_____________// enable cross section
____XV.SceneEnableXSection("true");
}
function EnableXSectionCapping()
{
_____________// enable cross-section capping
____XV.SceneEnableXSectionCapping("true");
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


SceneEnableXSectionHandler Reference

            <HTML>
<BODY>
<INPUT type="button" value="EnableXSection" onclick="EnableXSection();">
<INPUT type="button" value="EnableXSectionHandler"
            onclick="EnableXSectionHandler();">
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function EnableXSection()
{
_____________// enable cross section
____XV.SceneEnableXSection("true");
}
function EnableXSectionHandler()
{
_____________// enable cross-section handler
____XV.SceneEnableXSectionHandler("true");
}
</SCRIPT>
</BODY>
</HTML>


SceneFindMarkup() Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();">
<INPUT type="button" value="Find Markup" onclick="FindMarkup();">
<br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
____noteMarkup = XV.SceneCreateMarkup("Note");
____noteMarkup.ID = "MyMarkup"; _______________// set markup name
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");
____XV.SceneInsertMarkup(noteMarkup);
}

function FindMarkup()
{
____myMarkupObj = XV.SceneFindMarkup("MyMarkup");
____alert("Text of the label: " + myMarkupObj.Text);
}
</SCRIPT>
</BODY>
</HTML>


SceneGetAssemblyTreeXML Reference

XML Tree Structure

<SG3Assy GUID="" Visible="true|False|Partial>
<Name>Name</Name>
<SG3PI GUID=""> <Name>Name</Name>
<SG3Part ID="">
<SG3BasicElem type="">
</SG3BasicElem>
<SG3BasicElem type="">
</SG3BasicElem>
</SG3Part>
</SG3PI>
<SG3PI GUID=""> <name></name>
<SG3Part ID="">
<SG3BasicElem type="">
</SG3BasicElem>
</SG3Part>
</SG3PI>
<SG3Assy GUID=""> <name>Name</name>
<SG3PI name="" GUID="">
<SG3Part ID="">
<SG3BasicElem type="">
</SG3BasicElem>
</SG3Part>
</SG3PI>
</SG3Assy>
</SG3Assy>


SceneGetFirstMarkup() Reference

Visual Basic Note

The SceneGetFirstMarkup, SceneGetMarkup, SceneGetNextMarkup methods in Visual Basic return an "Unknown" object in the XView3D Type Library.

The markup types are not defined the XView3D Type Library. You must first add the MG Type Library to your project. In VB6, select the Project/References command and add "MG 1.0 Type Library" to the list of references in the dialog.

To use the markup methods, you must create a temporary IUnknown variable. This IUnknown variable can be cast to the general markup type, ISF_Markup. Use the ISF_Markup.Type property to detect the specific markup type. Assign the markup to a SF_MarkupXXX type variable to retreive the specific markup properties.

The following VB example demonstrates these steps:

Dim mk As ISF_Markup
Dim mkUnk As IUnknown
Dim mk2PtDraftAngle As SF_Markup2PtDraftAngle
Dim mk3PtAngle As SF_Markup3PtAngle
Dim mk3PtCircle As SF_Markup3PtCircle
Dim mkBoundBox As SF_MarkupBoundBox
Dim mkDistance As SF_MarkupDistance
Dim mkMassProperties As SF_MarkupMassProperties
Dim mkNote As SF_MarkupNote
Dim mkNote2D As SF_MarkupNote2D
Dim mkVertex As SF_MarkupVertex
Dim mkType As Long

Set mkUnk = XView1.SceneGetFirstMarkup
While Not (mkUnk Is Nothing)
  Set mk = mkUnk

  Select Case mk.Type
  Case 1 ' Note
    Set mkNote = mk
    MsgBox ("Note text:" & mkNote.Text)

  Case 2 ' Distance
    Set mkDistance = mk
    MsgBox ("Distance:" & _
      " x1:" & mkDistance.FirstX & _
      " y1:" & mkDistance.FirstY & _
      " z1:" & mkDistance.FirstZ & _
      " x2:" & mkDistance.SecondX & _
      " y2:" & mkDistance.SecondY & _
      " z2:" & mkDistance.SecondZ)

  Case 3 ' 3PtAngle
    Set mk3PtAngle = mk
    MsgBox ("3PtAngle:" & _
      " x1:" & mk3PtAngle.FirstX & _
      " y1:" & mk3PtAngle.FirstY & _
      " z1:" & mk3PtAngle.FirstZ & _
      " x2:" & mk3PtAngle.SecondX & _
      " y2:" & mk3PtAngle.SecondY & _
      " z2:" & mk3PtAngle.SecondZ & _
      " v2:" & mk3PtAngle.VertexX & _
      " v2:" & mk3PtAngle.VertexY & _
      " v2:" & mk3PtAngle.VertexZ)

  Case 4 ' Note2D
    Set mkNote2D = mk
    MsgBox ("Note2D text:" & mkNote2D.Text)

  Case 5 ' Vertex
    Set mkVertex = mk
    MsgBox ("Vertex:" & _
      " x:" & mkVertex.PointX & _
      " y:" & mkVertex.PointY & _
      " z:" & mkVertex.PointZ)

  Case 6 ' 3PtCircle
    Set mk3PtCircle = mk
    MsgBox ("3PtCircle:" & _
      " x1:" & mk3PtCircle.Point1X & _
      " y1:" & mk3PtCircle.Point1Y & _
      " z1:" & mk3PtCircle.Point1Z & _
      " x2:" & mk3PtCircle.Point2X & _
      " y2:" & mk3PtCircle.Point2Y & _
      " z2:" & mk3PtCircle.Point2Z & _
      " x3:" & mk3PtCircle.Point3X & _
      " y3:" & mk3PtCircle.Point3Y & _
      " z3:" & mk3PtCircle.Point3Z)

  Case 7 ' BoundBox
    Set mkBoundBox = mk
    MsgBox ("BoundBox:" & _
      " x1:" & mkBoundBox.XPositionX & _
      " y1:" & mkBoundBox.XPositionY & _
      " z1:" & mkBoundBox.XPositionZ & _
      " x2:" & mkBoundBox.YPositionX & _
      " y2:" & mkBoundBox.YPositionY & _
      " z2:" & mkBoundBox.YPositionZ & _
      " x3:" & mkBoundBox.ZPositionX & _
      " y3:" & mkBoundBox.ZPositionY & _
      " z3:" & mkBoundBox.ZPositionZ)

  Case 8 ' MassProperties
    Set mkMassProperties = mk
    MsgBox ("MassProperties:" & mkMassProperties.Text)

  Case 9 ' 2PtDraftAngle
    Set mk2PtDraftAngle = mk
    MsgBox ("2PtDraftAngle:" & _
      " x1:" & mk2PtDraftAngle.FirstX & _
      " y1:" & mk2PtDraftAngle.FirstY & _
      " z1:" & mk2PtDraftAngle.FirstZ & _
      " x2:" & mk2PtDraftAngle.SecondX & _
      " y2:" & mk2PtDraftAngle.SecondY & _
      " z2:" & mk2PtDraftAngle.SecondZ)

  Case Else
    MsgBox ("Unknown Markup Up")
  End Select

  Set mkUnk = XView1.SceneGetNextMarkup
Wend


SceneGetMarkup() Reference

Visual Basic Note

The SceneGetFirstMarkup, SceneGetMarkup, SceneGetNextMarkup methods in Visual Basic return an "Unknown" object in the XView3D Type Library.

The markup types are not defined the XView3D Type Library. You must first add the MG Type Library to your project. In VB6, select the Project/References command and add "MG 1.0 Type Library" to the list of references in the dialog.

To use the markup methods, you must create a temporary IUnknown variable. This IUnknown variable can be cast to the general markup type, ISF_Markup. Use the ISF_Markup.Type property to detect the specific markup type. Assign the markup to a SF_MarkupXXX type variable to retreive the specific markup properties.

The following VB example demonstrates these steps:

Dim mk As ISF_Markup
Dim mkUnk As IUnknown
Dim mk2PtDraftAngle As SF_Markup2PtDraftAngle
Dim mk3PtAngle As SF_Markup3PtAngle
Dim mk3PtCircle As SF_Markup3PtCircle
Dim mkBoundBox As SF_MarkupBoundBox
Dim mkDistance As SF_MarkupDistance
Dim mkMassProperties As SF_MarkupMassProperties
Dim mkNote As SF_MarkupNote
Dim mkNote2D As SF_MarkupNote2D
Dim mkVertex As SF_MarkupVertex
Dim mkType As Long

Set mkUnk = XView1.SceneGetFirstMarkup
While Not (mkUnk Is Nothing)
  Set mk = mkUnk

  Select Case mk.Type
  Case 1 ' Note
    Set mkNote = mk
    MsgBox ("Note text:" & mkNote.Text)

  Case 2 ' Distance
    Set mkDistance = mk
    MsgBox ("Distance:" & _
      " x1:" & mkDistance.FirstX & _
      " y1:" & mkDistance.FirstY & _
      " z1:" & mkDistance.FirstZ & _
      " x2:" & mkDistance.SecondX & _
      " y2:" & mkDistance.SecondY & _
      " z2:" & mkDistance.SecondZ)

  Case 3 ' 3PtAngle
    Set mk3PtAngle = mk
    MsgBox ("3PtAngle:" & _
      " x1:" & mk3PtAngle.FirstX & _
      " y1:" & mk3PtAngle.FirstY & _
      " z1:" & mk3PtAngle.FirstZ & _
      " x2:" & mk3PtAngle.SecondX & _
      " y2:" & mk3PtAngle.SecondY & _
      " z2:" & mk3PtAngle.SecondZ & _
      " v2:" & mk3PtAngle.VertexX & _
      " v2:" & mk3PtAngle.VertexY & _
      " v2:" & mk3PtAngle.VertexZ)

  Case 4 ' Note2D
    Set mkNote2D = mk
    MsgBox ("Note2D text:" & mkNote2D.Text)

  Case 5 ' Vertex
    Set mkVertex = mk
    MsgBox ("Vertex:" & _
      " x:" & mkVertex.PointX & _
      " y:" & mkVertex.PointY & _
      " z:" & mkVertex.PointZ)

  Case 6 ' 3PtCircle
    Set mk3PtCircle = mk
    MsgBox ("3PtCircle:" & _
      " x1:" & mk3PtCircle.Point1X & _
      " y1:" & mk3PtCircle.Point1Y & _
      " z1:" & mk3PtCircle.Point1Z & _
      " x2:" & mk3PtCircle.Point2X & _
      " y2:" & mk3PtCircle.Point2Y & _
      " z2:" & mk3PtCircle.Point2Z & _
      " x3:" & mk3PtCircle.Point3X & _
      " y3:" & mk3PtCircle.Point3Y & _
      " z3:" & mk3PtCircle.Point3Z)

  Case 7 ' BoundBox
    Set mkBoundBox = mk
    MsgBox ("BoundBox:" & _
      " x1:" & mkBoundBox.XPositionX & _
      " y1:" & mkBoundBox.XPositionY & _
      " z1:" & mkBoundBox.XPositionZ & _
      " x2:" & mkBoundBox.YPositionX & _
      " y2:" & mkBoundBox.YPositionY & _
      " z2:" & mkBoundBox.YPositionZ & _
      " x3:" & mkBoundBox.ZPositionX & _
      " y3:" & mkBoundBox.ZPositionY & _
      " z3:" & mkBoundBox.ZPositionZ)

  Case 8 ' MassProperties
    Set mkMassProperties = mk
    MsgBox ("MassProperties:" & mkMassProperties.Text)

  Case 9 ' 2PtDraftAngle
    Set mk2PtDraftAngle = mk
    MsgBox ("2PtDraftAngle:" & _
      " x1:" & mk2PtDraftAngle.FirstX & _
      " y1:" & mk2PtDraftAngle.FirstY & _
      " z1:" & mk2PtDraftAngle.FirstZ & _
      " x2:" & mk2PtDraftAngle.SecondX & _
      " y2:" & mk2PtDraftAngle.SecondY & _
      " z2:" & mk2PtDraftAngle.SecondZ)

  Case Else
    MsgBox ("Unknown Markup Up")
  End Select

  Set mkUnk = XView1.SceneGetNextMarkup
Wend


SceneGetNextMarkup() Reference

Visual Basic Note

The SceneGetFirstMarkup, SceneGetMarkup, SceneGetNextMarkup methods in Visual Basic return an "Unknown" object in the XView3D Type Library.

The markup types are not defined the XView3D Type Library. You must first add the MG Type Library to your project. In VB6, select the Project/References command and add "MG 1.0 Type Library" to the list of references in the dialog.

To use the markup methods, you must create a temporary IUnknown variable. This IUnknown variable can be cast to the general markup type, ISF_Markup. Use the ISF_Markup.Type property to detect the specific markup type. Assign the markup to a SF_MarkupXXX type variable to retreive the specific markup properties.

The following VB example demonstrates these steps:

Dim mk As ISF_Markup
Dim mkUnk As IUnknown
Dim mk2PtDraftAngle As SF_Markup2PtDraftAngle
Dim mk3PtAngle As SF_Markup3PtAngle
Dim mk3PtCircle As SF_Markup3PtCircle
Dim mkBoundBox As SF_MarkupBoundBox
Dim mkDistance As SF_MarkupDistance
Dim mkMassProperties As SF_MarkupMassProperties
Dim mkNote As SF_MarkupNote
Dim mkNote2D As SF_MarkupNote2D
Dim mkVertex As SF_MarkupVertex
Dim mkType As Long

Set mkUnk = XView1.SceneGetFirstMarkup
While Not (mkUnk Is Nothing)
  Set mk = mkUnk

  Select Case mk.Type
  Case 1 ' Note
    Set mkNote = mk
    MsgBox ("Note text:" & mkNote.Text)

  Case 2 ' Distance
    Set mkDistance = mk
    MsgBox ("Distance:" & _
      " x1:" & mkDistance.FirstX & _
      " y1:" & mkDistance.FirstY & _
      " z1:" & mkDistance.FirstZ & _
      " x2:" & mkDistance.SecondX & _
      " y2:" & mkDistance.SecondY & _
      " z2:" & mkDistance.SecondZ)

  Case 3 ' 3PtAngle
    Set mk3PtAngle = mk
    MsgBox ("3PtAngle:" & _
      " x1:" & mk3PtAngle.FirstX & _
      " y1:" & mk3PtAngle.FirstY & _
      " z1:" & mk3PtAngle.FirstZ & _
      " x2:" & mk3PtAngle.SecondX & _
      " y2:" & mk3PtAngle.SecondY & _
      " z2:" & mk3PtAngle.SecondZ & _
      " v2:" & mk3PtAngle.VertexX & _
      " v2:" & mk3PtAngle.VertexY & _
      " v2:" & mk3PtAngle.VertexZ)

  Case 4 ' Note2D
    Set mkNote2D = mk
    MsgBox ("Note2D text:" & mkNote2D.Text)

  Case 5 ' Vertex
    Set mkVertex = mk
    MsgBox ("Vertex:" & _
      " x:" & mkVertex.PointX & _
      " y:" & mkVertex.PointY & _
      " z:" & mkVertex.PointZ)

  Case 6 ' 3PtCircle
    Set mk3PtCircle = mk
    MsgBox ("3PtCircle:" & _
      " x1:" & mk3PtCircle.Point1X & _
      " y1:" & mk3PtCircle.Point1Y & _
      " z1:" & mk3PtCircle.Point1Z & _
      " x2:" & mk3PtCircle.Point2X & _
      " y2:" & mk3PtCircle.Point2Y & _
      " z2:" & mk3PtCircle.Point2Z & _
      " x3:" & mk3PtCircle.Point3X & _
      " y3:" & mk3PtCircle.Point3Y & _
      " z3:" & mk3PtCircle.Point3Z)

  Case 7 ' BoundBox
    Set mkBoundBox = mk
    MsgBox ("BoundBox:" & _
      " x1:" & mkBoundBox.XPositionX & _
      " y1:" & mkBoundBox.XPositionY & _
      " z1:" & mkBoundBox.XPositionZ & _
      " x2:" & mkBoundBox.YPositionX & _
      " y2:" & mkBoundBox.YPositionY & _
      " z2:" & mkBoundBox.YPositionZ & _
      " x3:" & mkBoundBox.ZPositionX & _
      " y3:" & mkBoundBox.ZPositionY & _
      " z3:" & mkBoundBox.ZPositionZ)

  Case 8 ' MassProperties
    Set mkMassProperties = mk
    MsgBox ("MassProperties:" & mkMassProperties.Text)

  Case 9 ' 2PtDraftAngle
    Set mk2PtDraftAngle = mk
    MsgBox ("2PtDraftAngle:" & _
      " x1:" & mk2PtDraftAngle.FirstX & _
      " y1:" & mk2PtDraftAngle.FirstY & _
      " z1:" & mk2PtDraftAngle.FirstZ & _
      " x2:" & mk2PtDraftAngle.SecondX & _
      " y2:" & mk2PtDraftAngle.SecondY & _
      " z2:" & mk2PtDraftAngle.SecondZ)

  Case Else
    MsgBox ("Unknown Markup Up")
  End Select

  Set mkUnk = XView1.SceneGetNextMarkup
Wend


SceneGetRootNode Reference

            <HTML>
<BODY>
<INPUT type="button" value="Get Root Node" onclick="GetRootNode();">
            <br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/Bearing.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
____function GetRootNode()
____{
________rootNode = XV.SceneGetRootNode();
________alert("Root Node: " + rootNode.name);
____}
</SCRIPT>
</BODY>
</HTML>


SceneGetXSectionCapping Reference

            <HTML>
<BODY>
<INPUT type="button" value="EnableXSection" onclick="EnableXSection();">
<INPUT type="button" value="GetXSectionCapping"
            onclick="GetXSectionCapping();">
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function EnableXSection()
{
_____________// enable cross section
____XV.SceneEnableXSection("true");
}
function GetXSectionCapping()
{
_____________// get cross-section capping status
____alert('Cross-section capping is on: ' + XV.SceneGetXSectionCapping());
}
</SCRIPT>
</BODY>
</HTML>


SceneGetXSectionDir Reference

            <HTML>
<BODY>
<INPUT type="button" value="EnableXSection" onclick="EnableXSection();">
<INPUT type="button" value="SetXSectionDir" onclick="SetXSectionDir();">
<INPUT type="button" value="GetXSectionDir" onclick="GetXSectionDir();">
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function EnableXSection()
{
_____________// enable cross section
____XV.SceneEnableXSection("true");
}
function SetXSectionDir()
{
_____________// set cross section direction
____XV.SceneSetXSectionDir(40,12,25);
}
function GetXSectionDir()
{
_____________// get cross section direction
____xSection = XV.SceneGetXSectionDir();
____alert('cross section direction: ' + xSection.X + ' ' + xSection.Y + ' ' +
            xSection.Z);
}
</SCRIPT>
</BODY>
</HTML>


SceneGetXSectionEnabled Reference

            <HTML>
<BODY>
<INPUT type="button" value="EnableXSection" onclick="EnableXSection();">
<INPUT type="button" value="GetXSectionEnabled"
            onclick="GetXSectionEnabled();">
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function EnableXSection()
{
_____________// enable cross section
____XV.SceneEnableXSection("true");
}
function GetXSectionEnabled()
{
_____________// get cross-section enabled status
____alert('Cross-section Enabled: ' + XV.SceneGetXSectionEnabled());
}
</SCRIPT>
</BODY>
</HTML>


SceneGetXSectionPos Reference

            <HTML>
<BODY>
<INPUT type="button" value="EnableXSection" onclick="EnableXSection();">
<INPUT type="button" value="SetXSectionPos" onclick="SetXSectionPos();">
<INPUT type="button" value="GetXSectionPos" onclick="GetXSectionPos();">
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function EnableXSection()
{
_____________// enable cross section
____XV.SceneEnableXSection("true");
}
function SetXSectionPos()
{
_____________// set cross section position
____XV.SceneSetXSectionPos(40,12,25);
}
function GetXSectionPos()
{
_____________// get cross section position
____xSection = XV.SceneGetXSectionPos();
____alert('cross section position: ' + xSection.X + ' ' + xSection.Y + ' ' +
            xSection.Z);
}
</SCRIPT>
</BODY>
</HTML>


SceneImportFile() Reference

<HTML>
<BODY>
<INPUT_TYPE="file"_NAME="userfile"
____SIZE=45_onChange="load3D(userfile.value)">
<BR>
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width="600"
____Height="400">
</OBJECT>

<Script>
function load3D( filename )
{
____XV.NewScene();
____XV.SceneImportFile(filename);
}
</Script>
</BODY>
</HTML>


SceneImportFileTyped Reference

 Actify.XView3D API Reference
Int SceneImportFileTyped String Filename
Int ImporterID

Description:
    Imports a model into the scene using a given importer.
    A selection algorithm based on the extension of the filename selects the importer automatically.
    If no importer can be found the function will fail.
    The filename can be:
    • a reference to a local file in the system;
    • a URL pointing to a remote file on a local area network (Intranet);
    • or a URL pointing directly to an Internet site.
    The file location can be specified with an absolute path name:
      C:\MyDir\MyFile.mod
    or with a relative path name:
      ..\MyDir\MyFile.mod
    For a download from a URL the file name must follow the conventions of the Unique Resource Locator system. Typically the name will be something like
      http://www.…/…/SomeFile.mod
      ftp://…/SomeFile.mod
      file://C:/…/SomeFile.mod
Input Parameters:
    Filename | Is the name of the model to import in the scene.
ImporterID | Is the importer ID to be used to read the file.

Return Value:
    Returns the ID assigned by SpinFire Viewer to the imported model.
    The function returns the value –1 if the importing operation fails.

See also:
  • The GetFirstImporter(), GetNextImporter() functions used to scan the available importers.
  • The NewScene() to clear-up a scene before loading a model.
  • The SceneImportFile() to import a model into the scene using the automatically selected importer.
  • The SceneImportAssembly() imports a model under a defined assembly node.

©2000 Actify Corporation. All Rights reserved worldwide. Actify and SpinFire are trademarks of Actify. All other brand and product names may be trademarks or registered trademarks of their respective owners.


SceneImportTypedAssembly Reference

 Actify.XView3D API Reference
Int SceneImportTypedAssembly String Filename
Int ImporterID
Node assemblyNode

Description:
    Imports a model into the scene using a given importer and attach the model under the given assembly node. A selection algorithm based on the extension of the filename selects the importer automatically. If no importer can be found the function will fail.
    The filename can be:
    • a reference to a local file in the system;
    • a URL pointing to a remote file on a local area network (Intranet);
    • or a URL pointing directly to an Internet site.
    The file location can be specified with an absolute path name:
      C:\MyDir\MyFile.mod
    or with a relative path name:
      ..\MyDir\MyFile.mod
    For a download from a URL the file name must follow the conventions of the Unique Resource Locator system. Typically the name will be something like
      http://www.…/…/SomeFile.mod
      ftp://…/SomeFile.mod
      file://C:/…/SomeFile.mod
Input Parameters:
    Filename | Is the name of the model to import in the scene.
ImporterID | Is the importer ID to be used to read the file.
assemblyNode | Is the node under which the loaded model will be attached.

Return Value:
    Returns the ID assigned by SpinFire Viewer to the imported model. The function returns the value –1 if the importing operation fails.

See also:
  • The GetFirstImporter(), GetNextImporter() functions used to scan the available importers.
  • The NewScene() to clear-up a scene before loading a model.
  • The SceneImportFile() to import a model into the scene using the automatically selected importer.
  • The SceneImportAssembly() imports a model under a defined assembly node.

©2000 Actify Corporation. All Rights reserved worldwide. Actify and SpinFire are trademarks of Actify. All other brand and product names may be trademarks or registered trademarks of their respective owners.


SceneInsertMarkup Reference

<HTML>
<BODY>
<INPUT type="button" value="Add Note" onclick="AddMarkup();"> <br>
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function AddMarkup()
{
_____________// create Note Object
____noteMarkup = XV.SceneCreateMarkup("Note");

_____________// set Note Object parameters
____noteMarkup.SetPoint(32.0, 0.0, 50.0);
____noteMarkup.SetPosition(0.0, 20.0, 55.0);
____noteMarkup.SetText("3D Note");

_____________// insert Note Object into the scene
____XV.SceneInsertMarkup(noteMarkup);
}
</SCRIPT>
</BODY>
</HTML>


SceneSaveAs Reference

<HTML>
<BODY>
<INPUT type="button" value="Save As" onclick="SaveFile();"><br>

__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function SaveFile()
____{
__________// bring SaveAs dialog box
______XV.SceneSaveAs( "" );
____}
__</SCRIPT>
</BODY>
</HTML>


SceneSetXSectionDir Reference

            <HTML>
<BODY>
<INPUT type="button" value="EnableXSection" onclick="EnableXSection();">
<INPUT type="button" value="SetXSectionDir" onclick="SetXSectionDir();">
<INPUT type="button" value="GetXSectionDir" onclick="GetXSectionDir();">
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function EnableXSection()
{
_____________// enable cross section
____XV.SceneEnableXSection("true");
}
function SetXSectionDir()
{
_____________// set cross section direction
____XV.SceneSetXSectionDir(40,12,25);
}
function GetXSectionDir()
{
_____________// get cross section direction
____xSection = XV.SceneGetXSectionDir();
____alert('cross section direction: ' + xSection.X + ' ' + xSection.Y + ' ' +
            xSection.Z);
}
</SCRIPT>
</BODY>
</HTML>


SceneSetXSectionPos Reference

            <HTML>
<BODY>
<INPUT type="button" value="EnableXSection" onclick="EnableXSection();">
<INPUT type="button" value="SetXSectionPos" onclick="SetXSectionPos();">
<INPUT type="button" value="GetXSectionPos" onclick="GetXSectionPos();">
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function EnableXSection()
{
_____________// enable cross section
____XV.SceneEnableXSection("true");
}
function SetXSectionPos()
{
_____________// set cross section position
____XV.SceneSetXSectionPos(40,12,25);
}
function GetXSectionPos()
{
_____________// get cross section position
____xSection = XV.SceneGetXSectionPos();
____alert('cross section position: ' + xSection.X + ' ' + xSection.Y + ' ' +
            xSection.Z);
}
</SCRIPT>
</BODY>
</HTML>


SceneXSectionFlip Reference

            <HTML>
<BODY>
<INPUT type="button" value="EnableXSection" onclick="EnableXSection();">
<INPUT type="button" value="XSectionFlip"
            onclick="XSectionFlip();">
<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
</OBJECT>

<SCRIPT LANGUAGE="JScript">
function EnableXSection()
{
_____________// enable cross section
____XV.SceneEnableXSection("true");
}
function XSectionFlip()
{
_____________// flip cross-section direction
____XV.SceneXSectionFlip();
____XV.Refresh();
}
</SCRIPT>
</BODY>
</HTML>


SetMouseAction Reference

<HTML>
<BODY>
__<INPUT type="button" value="Rotate"
_________onclick="XV.SetMouseAction('Rotate');">
__<INPUT type="button" value="Pan"
_________onclick="XV.SetMouseAction('Pan');">
__<INPUT type="button" value="Zoom"
_________onclick="XV.SetMouseAction('Zoom');">
__<INPUT type="button" value="RotateX"
_________onclick="XV.SetMouseAction('RotateX');">
__<INPUT type="button" value="RotateY"
_________onclick="XV.SetMouseAction('RotateY');">
__<INPUT type="button" value="RotateZ"
_________onclick="XV.SetMouseAction('RotateZ');">
__<INPUT type="button" value="Menu"
_________onclick="XV.SetMouseAction('Menu');"><br>

__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>
</BODY>
</HTML>


SetMouseFunction Reference

XV.SetMouseFunction("LEFT","CTRL","ZOOM");


UseShortMenu Reference

<HTML>
<BODY>
<INPUT type="button" value="Use Short Menu" onclick="UseShortMenu();">
__<br>
__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function UseShortMenu()
____{
__________// sets short menu
______XV.UseShortMenu("True");
______alert("Short Menu Enabled!"); ____}
__</SCRIPT>
</BODY>
</HTML>


SpinFast Reference

<HTML>
<BODY>
__<INPUT type="button" value="SpinFast" onclick="SpinFast();">
__<INPUT type="button" value="Is SpinFast enabled" onclick="IsSpinFast();">
<br>
__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function SpinFast()
____{
______XV.SpinFast("true");
____}
____function IsSpinFast()
____{
______alert(XV.IsSpinFast());
____}
__</SCRIPT>
</BODY>
</HTML>


Start Reference

ClientCLSID = "{########-####-####-####-############}"
OEMCode = "##########"

XV.Start ClientCLSID, OEMCode ____________//start control


Stop() Reference

<HTML>
<BODY>
__<INPUT type="button" value="Stop" onclick="Stop();">
<br>
__<OBJECT
____classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____id="XV"
____height="400"
____width="500">
____<PARAM Name="ModelName" Value="models/FlangedSupport.3D">
__</OBJECT>

__<SCRIPT LANGUAGE="JScript">
____function Stop()
____{
______XV.Stop();
____}
__</SCRIPT>
</BODY>
</HTML>


XView3D.Style Property

The Style property allows the web programmer to change a set of additional properties that define the style of presentaion of SpinFire inside the web page.

The syntax for style properties is the following:

    "<StyleName>:<StyleValue>; ..."

For example the following HTML code setup the markup fonts and style:

<HTML>
<BODY>
Welcome to this simple web page.
<OBJECT
Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
Width="300"
Height="200">
<PARAM Name="ModelName" Value="mydesign.3D">
<PARAM Name="Style" Value="mkfontface:Arial; mkfontsize:12; mkfontstyle:bold;">
</OBJECT>
</BODY>
</HTML>

The following table list the available styles and their possible values.


ViewApply() Reference

<HTML>
<BODY>
<INPUT type="button" value="New View" onclick="NewView();">
<OBJECT id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>
<SCRIPT LANGUAGE="JavaScript">
function NewView()
{
___________window.view1 = XV.NewView();
___________XV.ViewSetEyePoint(window.view1,150.00,80.30,200.00);
____________// Apply a given view to a particular view port
___________XV.ViewApply(window.view1,0);
}
</SCRIPT>
</BODY>
</HTML>


XView3D.ViewDelete function

            <HTML>
<BODY>
<INPUT type="button" value="New View" onclick="NewView();">
<INPUT type="button" value="Delete View" onclick="DeleteView();">
<OBJECT
            id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>
<SCRIPT LANGUAGE="JavaScript">

function NewView()
{
____________// create a new view
___________window.view1 = XV.NewView();
___________XV.ViewSetEyePoint(window.view1,150.00,80.30,200.00);
___________XV.ViewApply(window.view1,0);
}

function DeleteView()
{
____________// delete a view
___________XV.ViewDelete(window.view1);
____________// apply default front view
___________XV.ViewApply(11,0);
}
</SCRIPT>
</BODY>
</HTML>


XView3D.ViewFocusOnPart function

<HTML>
<BODY>
<INPUT type="button" value="Focus on Part" onclick="invokeFocusOnPart();">
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width=100%
____Height=100%>
<PARAM Name="ModelName" Value="Models/Plug.3d"></OBJECT>

<Script>
function invokeFocusOnPart()
{
_____// create null object
____var n = new Object(null);
____// activate Focus on Part interactively
____XV.ViewFocusOnPart( 0, n );
}
</Script>
</BODY>
</HTML>


XView3D.ViewFocusOnPoint function

<HTML>
<BODY>
<INPUT type="button" value="Focus on Point" onclick="invokeFocusOnPoint();">
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width=100%
____Height=100%>
<PARAM Name="ModelName" Value="Models/FlangedSupport.3d"></OBJECT>

<Script>
function invokeFocusOnPoint()
{
_____// create null object
____var n = new Object(null);
____// activate Focus on Point interactively
____XV.ViewFocusOnPoint( 0, n );
}
</Script>
</BODY>
</HTML>


XView3D.ViewGetFirst function

            <HTML>
<BODY>
<INPUT type="button" value="Create New Views" onclick="NewView();">
<INPUT type="button" value="Get First View" onclick="ViewGetFirst();">
<INPUT type="button" value="Get Next View" onclick="ViewGetNext();">
<INPUT type="button" value="Get Previous View" onclick="ViewGetPrev();">

<OBJECT
            id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function NewView()
{
____________// Create two new views
___________window.view1 = XV.NewView();
___________window.view2 = XV.NewView();
___________XV.ViewSetEyePoint(window.view1,150.00,80.30,200.00);
___________XV.ViewSetEyePoint(window.view2,200.00,100.30,300.00);
___________alert ("Created Views: " + window.view1 + " and " + window.view2);
}

function ViewGetFirst()
{
____________// Get First View ID
___________XV.ViewApply(window.view1,0);
___________alert ("First View ID: " + XV.ViewGetFirst());
}

function ViewGetNext()
{
____________// Get Next View ID
___________XV.ViewApply(window.view2,0);
___________alert ("Next View ID: " + XV.ViewGetNext());
}

function ViewGetPrev()
{
____________// Get Previous View ID
___________XV.ViewApply(window.view1,0);
___________alert ("Previous View ID: " + XV.ViewGetPrev());
}
</SCRIPT>
</BODY>
</HTML>


XView3D.ViewGetId function

            <HTML>
<BODY>
<INPUT type="button" value="Create New View" onclick="NewView();">
<INPUT type="button" value="Get View Name" onclick="ViewGetName();">
<INPUT type="button" value="Get View ID" onclick="ViewGetID();">

<OBJECT
            id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function NewView()
{
____________// Create new view
___________view1 = XV.NewView();
___________XV.ViewSetEyePoint(view1,150.00,80.30,200.00);
___________alert ("Created View: " + view1);
}

function ViewGetName()
{
____________// Get View Name
___________XV.ViewApply(view1,0);
___________alert ("View Name: " + XV.ViewGetName(view1));
}

function ViewGetID()
{
____________// Get View ID
___________name=XV.ViewGetName(view1);
___________alert ("View ID: " + XV.ViewGetID(name));
}

</SCRIPT>
</BODY>
</HTML>


XView3D.ViewGetName function

            <HTML>
<BODY>
<INPUT type="button" value="Create New View" onclick="NewView();">
<INPUT type="button" value="Get View Name" onclick="ViewGetName();">
<INPUT type="button" value="Get View ID" onclick="ViewGetID();">

<OBJECT
            id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function NewView()
{
____________// Create new view
___________view1 = XV.NewView();
___________XV.ViewSetEyePoint(view1,150.00,80.30,200.00);
___________alert ("Created View: " + view1);
}

function ViewGetName()
{
____________// Get View Name
___________XV.ViewApply(view1,0);
___________alert ("View Name: " + XV.ViewGetName(view1));
}

function ViewGetID()
{
____________// Get View ID
___________name=XV.ViewGetName(view1);
___________alert ("View ID: " + XV.ViewGetID(name));
}

</SCRIPT>
</BODY>
</HTML>


XView3D.ViewGetNext function

            <HTML>
<BODY>
<INPUT type="button" value="Create New Views" onclick="NewView();">
<INPUT type="button" value="Get First View" onclick="ViewGetFirst();">
<INPUT type="button" value="Get Next View" onclick="ViewGetNext();">
<INPUT type="button" value="Get Previous View" onclick="ViewGetPrev();">

<OBJECT
            id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function NewView()
{
____________// Create two new views
___________window.view1 = XV.NewView();
___________window.view2 = XV.NewView();
___________XV.ViewSetEyePoint(window.view1,150.00,80.30,200.00);
___________XV.ViewSetEyePoint(window.view2,200.00,100.30,300.00);
___________alert ("Created Views: " + window.view1 + " and " + window.view2);
}

function ViewGetFirst()
{
____________// Get First View ID
___________XV.ViewApply(window.view1,0);
___________alert ("First View ID: " + XV.ViewGetFirst());
}

function ViewGetNext()
{
____________// Get Next View ID
___________XV.ViewApply(window.view2,0);
___________alert ("Next View ID: " + XV.ViewGetNext());
}

function ViewGetPrev()
{
____________// Get Previous View ID
___________XV.ViewApply(window.view1,0);
___________alert ("Previous View ID: " + XV.ViewGetPrev());
}
</SCRIPT>
</BODY>
</HTML>


XView3D.ViewGetPrev function

            <HTML>
<BODY>
<INPUT type="button" value="Create New Views" onclick="NewView();">
<INPUT type="button" value="Get First View" onclick="ViewGetFirst();">
<INPUT type="button" value="Get Next View" onclick="ViewGetNext();">
<INPUT type="button" value="Get Previous View" onclick="ViewGetPrev();">

<OBJECT
            id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function NewView()
{
____________// Create two new views
___________window.view1 = XV.NewView();
___________window.view2 = XV.NewView();
___________XV.ViewSetEyePoint(window.view1,150.00,80.30,200.00);
___________XV.ViewSetEyePoint(window.view2,200.00,100.30,300.00);
___________alert ("Created Views: " + window.view1 + " and " + window.view2);
}

function ViewGetFirst()
{
____________// Get First View ID
___________XV.ViewApply(window.view1,0);
___________alert ("First View ID: " + XV.ViewGetFirst());
}

function ViewGetNext()
{
____________// Get Next View ID
___________XV.ViewApply(window.view2,0);
___________alert ("Next View ID: " + XV.ViewGetNext());
}

function ViewGetPrev()
{
____________// Get Previous View ID
___________XV.ViewApply(window.view1,0);
___________alert ("Previous View ID: " + XV.ViewGetPrev());
}
</SCRIPT>
</BODY>
</HTML>


View(Get/Set)EyePoint Reference

<HTML>
<BODY>
<INPUT type="button" value="Set/Get Eye Point" onclick="SetEyePoint();">

<OBJECT id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function SetEyePoint()
{
____________// Create new view
___________view1 = XV.NewView();
____________// Set Eye Point
___________XV.ViewSetEyePoint(view1,150.00,80.30,200.00);
____________// Apply new view
___________XV.ViewApply(view1,0);
____________// Get Eye Point
___________eyePoint = XV.ViewGetEyePoint(view1);
___________alert ("New Eye Point Coordinates: " + eyePoint.X + "," + eyePoint.Y + "," + eyePoint.Z);
}

</SCRIPT>
</BODY>
</HTML>


View(Get/Set)Perspective Reference

<HTML>
<BODY>
<INPUT type="button" value="Set/Get Perspective" onclick="SetPerspective();">

<OBJECT id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function SetPerspective()
{
____________// Set Perspective
___________XV.ViewSetPerspective(0,false);
____________// Get Perspective
___________alert ("New Perspective Setting: " + XV.ViewGetPerspective(0));
}

</SCRIPT>
</BODY>
</HTML>


View(Get/Set)TargetPt Reference

<HTML>
<BODY>
<INPUT type="button" value="Set/Get Target Point" onclick="SetTargetPoint();">

<OBJECT id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function SetTargetPoint()
{
____________// Create new view
___________view1 = XV.NewView();
____________// Set Target Point
___________XV.ViewSetTargetPoint(view1,-50.00,25.30,10.00);
____________// Apply new view
___________XV.ViewApply(view1,0);
____________// Get Target Point
___________targetPoint = XV.ViewGetTargetPoint(view1);
___________alert ("New Target Point Coordinates: " + targetPoint.X + "," + targetPoint.Y + "," + targetPoint.Z);
}

</SCRIPT>
</BODY>
</HTML>


View(Get/Set)VuvDir() Reference

<HTML>
<BODY>
<INPUT type="button" value="Set/Get View-Up Vector" onclick="SetVuvDir();">

<OBJECT id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function SetVuvDir()
{
____________// Create new view
___________view1 = XV.NewView();
____________// Set View-Up Vector
___________XV.ViewSetVuvDir(view1,1,0,1);
____________// Apply new view
___________XV.ViewApply(view1,0);
____________// Get View-Up Vector
___________vuvDir = XV.ViewGetVuvDir(view1);
___________alert ("New Eye Point Coordinates: " + vuvDir.X + "," + vuvDir.Y + "," + vuvDir.Z);
}

</SCRIPT>
</BODY>
</HTML>


XView3D.Style Property

<HTML>
<BODY>
<INPUT type="button" value="Set Start" onclick="SetStart();">
<INPUT type="button" value="Get Start" onclick="GetStart();">

<OBJECT id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
<PARAM NAME="ModelName" VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">
function SetStart()
{
var view1 = XV.NewView();
var setview = XV.ViewSetAsStart(view1);
alert("Set Start View = " + setview);
}
function GetStart()
{
var startview = XV.ViewGetStart();
alert("Start View = " + startview);
XV.ViewApply(startview,0);
}
</SCRIPT>
</BODY>
</HTML>


XView3D.ViewGetXML function

            <HTML>
<BODY>
<INPUT type="button" value="ViewGetXML" onclick="ViewGetXML();">
<INPUT type="button" value="ViewGetXMLText" onclick="ViewGetXMLText();">

<OBJECT
            id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function ViewGetXML()
{
____node = XV.ViewGetXML(0);
____alert(node.xml);
}
function ViewGetXMLText()
{
____text = XV.ViewGetXMLText(0);
____alert(text);
}
</SCRIPT>
</BODY>
</HTML>


XView3D.ViewMove function

<HTML>
<BODY>
<INPUT type="button" value="ViewMove" onclick="RotateX();">

<OBJECT id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function RotateX()
{
____XV.ViewMove(0,"ROTATEX",45);
}
</SCRIPT>
</BODY>
</HTML>


XView3D.ViewportDeleteAll function

            <HTML>
<BODY>
<INPUT type="button" value="New4ViewsViewport"
            onclick="New4ViewsViewport();">
<INPUT type="button" value="ViewportDeleteAll"
            onclick="ViewportDeleteAll();">
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width=100%
____Height=100%>
<PARAM Name="ModelName" Value="Models/FlangedSupport.3d"></OBJECT>

<Script>
function New4ViewsViewport()
{
_____// create new layout with 4 viewports
____XV.New4ViewsViewport();
}
function ViewportDeleteAll()
{
_____// Delete all viewports
____XV.ViewportDeleteAll();
}
</Script>
</BODY>
</HTML>


XView3D.ViewportGetSetLock function

            <HTML>
<BODY>
<INPUT type="button" value="ViewportSetLock"
            onclick="ViewportSetLock();">
<INPUT type="button" value="ViewportGetLock"
            onclick="ViewportGetLock();">
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width=100%
____Height=100%>
<PARAM Name="ModelName" Value="Models/FlangedSupport.3d"></OBJECT>

<Script>
function ViewportSetLock()
{
_____// Set lock to true on viewport 0
____alert(XV.ViewportSetLock(-1, "true"));
}
function ViewportGetLock()
{
_____// Get status of viewport lock
____alert(XV.ViewportGetLock(-1));
}
</Script>
</BODY>
</HTML>


XView3D.ViewportGetSetView function

<HTML>
<BODY>
<INPUT type="button" value="New4ViewsViewport" onclick="New4ViewsViewport();">
<INPUT type="button" value="ViewportSetView" onclick="ViewportSetView();">
<INPUT type="button" value="ViewportGetView" onclick="ViewportGetView();">
<OBJECT
____Classid="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
____ID="XV"
____Width=100%
____Height=100%>
<PARAM Name="ModelName" Value="Models/FlangedSupport.3d"></OBJECT>

<Script>
function New4ViewsViewport()
{
_____// Create new 4 viewport layout
____alert(XV.New4ViewsViewport());
}
function ViewportSetView()
{
_____// Set view to bottom (14) on viewport 0
____alert(XV.ViewportSetView(-1, 14));
}
function ViewportGetView()
{
_____// Get viewID of viewport
____alert(XV.ViewportGetView(-1));
}
</Script>
</BODY>
</HTML>


ViewSetAsStart Reference

<HTML>
<BODY>
<INPUT type="button" value="Set Start" onclick="SetStart();">
<INPUT type="button" value="Get Start" onclick="GetStart();">

<OBJECT id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
<PARAM NAME="ModelName" VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">
var view1;
function SetStart()
{
var view1 = XV.NewView();
var setview = XV.ViewSetAsStart(view1);
alert("Set Start View = " + setview);
}
function GetStart()
{
var startview = XV.ViewGetStart();
alert("Start View = " + startview);
XV.ViewApply(startview,0);
}
</SCRIPT>
</BODY>
</HTML>


XView3D.ViewSetName function

            <HTML>
<BODY>
<INPUT type="button" value="Create New View" onclick="NewView();">
<INPUT type="button" value="Set View Name" onclick="ViewSetName();">

<OBJECT
            id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function NewView()
{
____________// Create new view
___________view1 = XV.NewView();
___________XV.ViewSetEyePoint(view1,150.00,80.30,200.00);
___________alert ("Created View: " + XV.ViewGetName(view1));
}

function ViewSetName()
{
____________// Set View Name
___________XV.ViewSetName(view1,'View1');
___________alert ("New View Name: " + XV.ViewGetName(view1));
}

</SCRIPT>
</BODY>
</HTML>


ViewZoomFit() Reference

<HTML>
<BODY>
<INPUT type="button" value="Zoom Fit" onclick="SetZoomFit();">

<OBJECT id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function SetZoomFit()
{
____________// Set New Target Point
___________XV.ViewSetTargetPoint(0,-50.00,25.30,10.00);
___________alert('New target point applied. Press OK to perform ZoomFit.')
____________// Set Zoom Fit
___________XV.ViewZoomFit(0);
}

</SCRIPT>
</BODY>
</HTML>


ViewZoomWindow() Reference

<HTML>
<BODY>
<INPUT type="button" value="Activate Zoom Window" onclick="ZoomWindow();">

<OBJECT id="XV" CLASSID="CLSID:A31CCCB0-46A8-11D3-A726-005004B35102"
HEIGHT=100% WIDTH=100% >
___<PARAM NAME="ModelName"_VALUE="Models/FlangedSupport.3d">
</OBJECT>

<SCRIPT LANGUAGE="JavaScript">

function ZoomWindow()
{
____________// Activate Zoom Window
___________XV.ViewZoomWindow(0);
}

</SCRIPT>
</BODY>
</HTML>


 XView:

DXView: