Вы находитесь на странице: 1из 26

3D Command Wizard

Programming Help

Version 6.0 March 2005 DSP3D-PE-200050A


Copyright
Copyright © 2003-2005 Intergraph Corporation. All Rights Reserved.
Including software, file formats, and audiovisual displays; may be used pursuant to applicable software license
agreement; contains confidential and proprietary information of Intergraph and/or third parties which is protected by
copyright law, trade secret law, and international treaty, and may not be provided or otherwise made available
without proper authorization.

Restricted Rights Legend


Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the
Contractor Rights in Technical Data clause at DFARS 252.227-7013, subparagraph (b) of the Rights in Computer
Software or Computer Software Documentation clause at DFARS 252.227-7014, subparagraphs (b)(1) and (2) of
the License clause at DFARS 252.227-7015, or subparagraphs (c) (1) and (2) of Commercial Computer Software---
Restricted Rights at 48 CFR 52.227-19, as applicable.
Unpublished---rights reserved under the copyright laws of the United States.
Intergraph Corporation
Huntsville, Alabama 35894-0001

Warranties and Liabilities


All warranties given by Intergraph Corporation about equipment or software are set forth in your purchase contract,
and nothing stated in, or implied by, this document or its contents shall be considered or deemed a modification or
amendment of such warranties. Intergraph believes the information in this publication is accurate as of its
publication date.
The information and the software discussed in this document are subject to change without notice and are subject to
applicable technical product descriptions. Intergraph Corporation is not responsible for any error that may appear in
this document.
The software discussed in this document is furnished under a license and may be used or copied only in accordance
with the terms of this license.
No responsibility is assumed by Intergraph for the use or reliability of software on equipment that is not supplied by
Intergraph or its affiliated companies. THE USER OF THE SOFTWARE IS EXPECTED TO MAKE THE FINAL
EVALUATION AS TO THE USEFULNESS OF THE SOFTWARE IN HIS OWN ENVIRONMENT.

Trademarks
Intergraph, the Intergraph logo, SmartSketch, FrameWorks, SmartPlant, INtools, MARIAN, and PDS are registered
trademarks of Intergraph Corporation. Microsoft and Windows are registered trademarks of Microsoft Corporation.
ISOGEN is a registered trademark of Alias Limited. Other brands and product names are trademarks of their
respective owners.
Table of Contents

Table of Contents
Welcome..............................................................................................................................4
Using the Command Wizard ........................................................................................5
Introduction...................................................................................................................6
Command Wizard - Step 0.................................................................................................. 6
Identification.................................................................................................................7
Command Wizard - Step 1.................................................................................................. 7
Properties ......................................................................................................................9
Command Wizard - Step 2.................................................................................................. 9
Visual Aspects ............................................................................................................11
Command Wizard - Step 3................................................................................................ 11
References and Services .............................................................................................14
Command Wizard - Step 4................................................................................................ 14
Utilities and Debugging Aids .....................................................................................16
Command Wizard - Step 5................................................................................................ 16
Notification and Event Handlers ................................................................................17
Command Wizard - Step 6................................................................................................ 17
SmartStep Definition ..................................................................................................19
Command Wizard - Step 7................................................................................................ 19
Prompt and Selection Characteristics .........................................................................21
Command Wizard - SmartStep Definition 1..................................................................... 21
Constraints and Options..............................................................................................23
Command Wizard - SmartStep Definition 2..................................................................... 23
Finish ..........................................................................................................................25

Index..................................................................................................................................26

3D Command Wizard Programming Help 3


Welcome

Welcome
The Command Wizard Help provides introductory information to developers who want to create
custom commands. Before creating commands or programs, you should be very familiar with the
software interactively and understand its basic concepts of projects, engineering, architecture,
concurrency, and datastores.

For more specific information about creating commands using the software application
programming interface (API), please contact Intergraph Services.

4 3D Command Wizard Programming Help


Welcome

Using the Command Wizard


The Command Wizard allows you to select relevant tools and methods for a new Visual Basic
project and build a basic command based on those selected requirements.

Note: You must add the TaskHost project to the integrated development environment (IDE)
before you can debug your Visual Basic project. For information on adding the TaskHost
project to your project, see "Debugging Your Code" in the "Recommended Guidelines" section
of the SmartPlant 3D/IntelliShip Programmer's Guide.

For more information about using the TaskHost project and creating commands using the
software's application programming interface (API), please contact Intergraph Services.

After you have created your command, you can run the command by clicking Tools > Custom
Commands. You can complete all the steps performed by the Command Wizard with regular
Visual Basic tools, but the Command Wizard makes the process very easy.

The Command Wizard has the following steps:

• Step 0 – Introduction, page 6


• Step 1 – Identification, page 7
• Step 2 – Properties, page 9
• Step 3 – Visual Aspects, page 11
• Step 4 – References and Services, page 14
• Step 5 – Utilities and Debugging Aids, page 16
• Step 6 – Notification and Event Handlers, page 17
• Step 7 - SmartStep Definition, page 19
• SmartStep Definition 1 – Prompt and Selection Characteristics, page 21
• SmartStep Definition 2 – Constraints and Options, page 23
• Step 8 - Finish, page 25

3D Command Wizard Programming Help 5


Welcome

Introduction

Command Wizard - Step 0


The Command Wizard can create a normal (IJCommand2) command project or a modify
(IModifyCmd) command project. You can specify various services that can be used. The code
that enables those services is generated automatically.

This step allows you to choose whether or not to display this introductory form the next time you
run the wizard.

6 3D Command Wizard Programming Help


Welcome

Identification

Command Wizard - Step 1


This step assists you in gathering the basic information that is required to create a new command.
This includes project and command names, description, type, and whether the command
implements the IJCommand2 interface or the IModifyCmd interface.

Create a new command in:


The first choice is whether you want to add the new command to an existing open project or to
create a new project. Note that the new command or project reside only in memory. You should
use regular Visual Basic methods to save the new command or project when you complete the
wizard process.

Current Project - Can be selected only if there is at least one project open. When you select this
option, all of the boxes in the Create a new project frame are disabled.

New Project - If selected, any currently open projects are closed. The new project is created and
appears as the active project in the Visual Basic environment.

Create a New Project


New Project Name: Enter a valid name in this box. Spaces are not allowed in the project name.
Please reference SmartPlant 3D naming rules when entering the project name.

New Project Description: This string appears in the Visual Basic references listing, and should
follow naming rules.

Type of new project: The project type can be either an ActiveX control OCX (default) or
Dynamic Link Library (DLL).

OCX - Adds any required ribbon component to the project.

DLL - Creates a separate ribbon bar ActiveX control project to house the ribbon, if one is
required.

Reset Default
Applies all default settings to Step 1.

3D Command Wizard Programming Help 7


Welcome

Create a new command


Type of command:
Normal Command - Implements the IJCommand2 class. CommandManager almost
exclusively uses this interface to control command execution such as starting, stopping, pausing,
and resuming. All commands implement this interface.

Remarks about transactions:

- High priority commands cannot commit or abort transactions.

- Normal priority commands can commit and abort transactions. They must stop their transaction
when they are stopped or fail (to leave the system in a clean state).

- Low priority commands can use transactions. They must stop their transaction when they are
stopped, suspended, or fail.

Modify Command - Implements the IModifyCmd class and is designed to be used by modify
commands. SelectCmd interface uses this interface to inform its subordinate modify command
of state changes. You should implement this interface in all modify commands that are started
and controlled by the SelectCmd interface.

Modify commands are subordinate to the SelectCmd interface. The SelectCmd interface starts
and stops them and passes edited GraphicView events on to them. Normally, the SelectCmd
interface examines all mouse events in its own context to perform locates, fences, changes to the
select set, and so forth. There are times when the ModifyCmd interface needs to do the
processing instead of the SelectCmd interface. For example, the ModifyCmd interface might
need to locate and select a reference object.

Command Name: Regardless of which project creation option is selected, you must enter a
unique name for your command. Spaces are not allowed in the command name. Keep in mind
that this string becomes part of the ProgID.

Author: The Author information becomes part of the comments inserted into the Visual Basic
project's header information.

Company: The Company information becomes part of the comments inserted into the Visual
Basic project's header information.

8 3D Command Wizard Programming Help


Welcome

Properties

Command Wizard - Step 2


This step gathers enabling characteristics and properties for the new command.

Command is modal or Command is suspendable - Allows you to choose whether your


command is modal or suspendable. If you select Command is modal, then Command is
suspendable is disabled, because a modal command cannot be suspended. Also, if you are
creating a modify command, then Command is suspendable is disabled, because it is not a
property of the IModifyCmd interface.

Modal: Can be stopped immediately after it is started, for example, Delete (no dialog), Edit
Properties, Open Session.

Suspendable: An event-driven command, which can be interrupted. This means that it can be
added onto the stack while another command is executed.

Note: If you check the Command is modal option, you cannot define SmartStep or
SmartSketch3d functionality, because they are higher priority commands.

Enabling Characteristics
Needs active view

View type: If the command requires an active view, the default view type is the
IJDGraphicView interface.

Needs active connection - If your command needs an active database connection. The
enumerated value imsEnableCmdOnActiveConnection is added to
IJCommand2_EnableUIFlags.

Enum CommandEnableFlags Value Description


imsEnableCmdOnActiveConnection 0x10 An active connection to the database
must be available. If not, the
command is not enabled.

Needs non-empty select set - If the command needs a non-empty SelectSet, and the command is
to act on already selected elements upon activation. The enumerated value
imsEnableCmdOnSelectSet is added to IJCommand2_EnableUIFlags.

Enum Value Description


CommandEnableFlags
imsEnableCmdOnSelectSet 0x4 The SelectSet must be non-empty. Nothing is

3D Command Wizard Programming Help 9


Welcome

implied or inferred about the kind of things in


a non-empty SelectSet - only that it is non-
empty.

Needs EnableSpecial check - If the command needs to be enabled. The enumerated value
imsEnableCmdOnEnableSpecial is added to IJCommand2_EnableUIFlags.

Property Value Description


EnableSpecial Boolean Read Only. This is a "reactive" property that examines
the applet state and returns True if the command should
be enabled. It is invoked if imsEnableOnEnableSpecial
is set in the EnableUIFlags property.

Enum CommandEnableFlags Value Description


imsEnableCmdOnEnableSpecial 0x8 When set, then the EnableSpecial
property is interrogated to see if the
command should be enabled.

Note: The CommandMgr compares each of these flags against the state of the system before it
actually starts a command.

10 3D Command Wizard Programming Help


Welcome

Visual Aspects

Command Wizard - Step 3


This step gathers information for certain visual aspects, including internationalization and
context sensitivity (F1), that might be required for the new command.

Has a ribbon - Creates a ribbon project, including the following:

• Adds a control to the project or creates a separate ribbon project to house the control.
• Adds references to the ribbon project in the new command.
• Depending on your type of command, adds code to IJCommand2_Start or
IModifyCmd_Start.
Start(ByVal CommandID As Long, ByVal arg As Variant)

Starts the command. Priority is used to determine whether the active command is stacked or
killed.

Parameter Data Type Description


CommandID Long CommandID is returned to the caller, and can be used
in StopCommand of IJCommandManager2.
arg VARIANT

• Adds code to IJCommand2_Stop, IJCommand2_Suspend and


IJCommand2_Resume.
• Adds a reference to Ingr SmartPlant 3D ICDPInterfaces v1.0 Library.
• Adds a reference to Ingr SmartPlant 3D Container Menu Service v1.0 Library.
• Adds m_EVRibbonBar_OnFinish to your command.
• Adds m_EVRibbonBar_OnStepChange to your command.
• Adds code to the ribbon project establishing previously named events and other basic
code.
Ribbon ProgID: The default program ID is displayed in the text box. This ID takes one of two
forms depending on the type of project being created. If you are creating an ActiveX project,
then the control is added to the project. However, the control cannot operate in the project for an
ActiveX DLL. In this case the wizard creates a second ActiveX Control project and adds the
control there. If the control project is added, then it must be compiled and the component
referenced before you can compile the main project. The following note is automatically inserted
into your command so that if it fails to compile, you can understand what steps to take:

3D Command Wizard Programming Help 11


Welcome

'***************************************************************************
'The ribbonbar project referenced by the following two lines was
'created with the commandWizard at the same time as this command was created.
'Reference to the ribbonbar must be completed before this command will
'compile.
'To complete the process do the following:
'1. Make BEBCmdRB the active project
'2. Run File > Make BEBCmdRB.ocx
'3. Make BEBCmd the active project.
'4. Run Project > Components
'5. Mark the box beside BEBCmdRB Ribbonbar and select OK.

'****************************************************************************
In either ActiveX project, the correct ProgID is inserted into the field.

Has a form - Adds a starter form along with appropriate global variables and code in the
appropriate IJCommand2 or the IModifyCmd command Start, Stop, Suspend, and Resume
modules.

Supply Localizer - References Ingr Marine Localizer 2.0 Library, adds code to initialize the
localizer, and adds the helper function GetLocalizedString to CommonSubs.bas. This BAS file
is automatically created for your Visual Basic command project. The localizer is provided for
your commands that must address internationalization requirements, that is, need to be used by
more than one language group.

Supply context-sensitive Help - Implements the IJCommandHelpInfo interface and adds


initialization code and the help info module.

IJCommandHelpInfo

This interface is supported by ActiveX® DLL commands and provides context-sensitive help.
The interface returns the help topic index to the OnlineHelp object.

Property Return Type Description


HelpIndex Long Read Only. This property returns a help topic index
corresponding to the current state of the command.

OnlineHelp Object

Context-sensitive help assists users by providing help based on specific commands. This enables
users to get specific information about whatever part of the program they are using at any given
moment.

The help author creates a compiled help (CHM) file that contains the context-sensitive help
topics and information that maps the topics to specific commands.

Help for each command is written in an individual HTML page and has a context number (or tag
index) associated with it. The index is supplied to OnlineHelp using the IJCommandHelpInfo
interface. At initialization of a task, the Task Manager must initialize the IMSHelp component,

12 3D Command Wizard Programming Help


Welcome

which contains the OnlineHelp object. The initialization consists of specifying the path and root
name of the compiled help file. (The root name does not include the CHM extension).

3D Command Wizard Programming Help 13


Welcome

References and Services

Command Wizard - Step 4


This step allows you to include certain references and services for your command. Having the
ability to reference many type libraries at once in this step saves you the time of manually
performing the tasks.

AutoMath - Specifies a reference to the Ingr SmartPlant3D AutoMath 1.0 Library, which is
contained in the AutoMath.dll file.

The math objects are designed to provide you with a basic collection of vector math
functionality. The math objects are non-persistent objects that implement default interfaces with
methods and properties for abstract manipulation of the underlying data types.

Objects Description
DPosition Implements the interface methods and properties for a point object in 3D
space.
DVector Implements the interface methods and properties for a 3D vector object.
DT4x4 Implements the interface methods and properties for a 4x4 column-major
matrix object.

Registry support - Adds registry support, specifying a reference to Ingr SmartPlant 3D


RegistryHandler v 1.0 Library. The helper modules GetFromRegistry, SaveToRegistry, and
DeleteFromRegistry are added to CommonSubs.bas. This BAS file is automatically generated
for your Visual Basic project.

The Registry object provides the initial connection to the system registry. In fact, it is the only
IMSRegistryHandler object that a client can safely create directly (as when using Visual
Basic's New operator). You can create new Registry objects to connect to the local registry.

The Registry object provides two separate but compatible types of access to the connected
system registry:

• It provides various service-like methods to directly and easily get or set values, add
registry keys, and so on. For example, given a key name and an item name, the client
can retrieve the corresponding value in a single call. Most clients find these methods
sufficient for most registry access.
• It provides methods to allocate RegistryNode objects and the rest of the
IMSRegistryHandler objects. Collectively, these objects provide the means by
which to navigate through the system registry hierarchy, as well as complete access to
the registry.

14 3D Command Wizard Programming Help


Welcome

Client-Side element display - Adds client-side element display service and specifies references
to the Ingr SP3D CSElementDisplay 1.0 Type Library and Ingr SP3D
CSElementDisplayMgr v 1.0.

Relationships - Adds the ability to manipulate relationships and specifies a reference to the Ingr
SmartPlant 3D Relation v 1.0 Library.

Geometry3D - Specifies a reference to the Ingr 3D Geometry 1.0 Type Library.

StepFilter - Provides an interface with methods and properties to filter a collection of elements
according to a set of criteria. The StepFilter object can be used to check whether an element or
list of elements match the criteria. It can modify an existing collection of elements by removing
those that do not match the criteria set that are using the interface.

The criteria used with this object can be customized. The set of criteria is a string composed of a
list of criteria. A set of criteria can be viewed as a logical mask. Each criteria can be defined with
the conjunctive OR or AND or prefixed by NOT.

Four kinds of criteria are allowed: interface name, IID (string) of an interface, a Visual Basic
function, or the ProgID of an object class.

Entity support - Specifies a reference to the Ingr SP3D Entity Support 1.0 Type Library.

The EntitySupport component defines the interface and basic template objects for application
components. The EntitySupport component also provides the implementations of a Template
Business Object (BO) and a Template Persistent Object (JPO). Every application business
object must inherit from the Template Business Object.

StyleRuleMgr - Specifies a reference to the Ingr SP3D StyleRuleMgr 1.0 Type Library.

JCommand - Allows the user to make queries on a database. This option specifies a reference to
the Ingr SP3D JClientCommand 1.0 Type Library so you can use the JCommand object.

Units of measure - References the Ingr SmartPlant 3D Units Of Measure v 1.0 Client
Library and Ingr SmartPlant 3D UnitsOfMeasure Services v1.0 Library. This option also
declares the module variable m_UnitsOfMeasure and adds the appropriate initialization to the
applicable IModifyCmd or IJCommand2 modules.

PreferencesMgr - References the Ingr SmartPlant 3D ICDPInterfaces v 1.0 Library and


Ingr SP3D CommonApp Utilities v 1.0. The helper module GetOptionsFromPreferences is
added to CommonSubs.bas. This Visual Basic BAS file is automatically generated in your
Visual Basic project.

ValueMgr - References the Ingr SmartPlant 3d ICDPInterface v 1.0 Library, if it has not
already been included by another option.

This singleton object is exported to the Trader as ValueMgr (TKTValueMgr is the Const String
in CoreTraderKeys.bas) that provides, in essence, a global dictionary. Tasks and other
components can use this object to interrogate and set the values for keys on a global scale.

3D Command Wizard Programming Help 15


Welcome

Utilities and Debugging Aids

Command Wizard - Step 5


This step allows you to select certain utilities and debugging aids.

Debug Aids
Uses debug support - Adds debug support. This functionality provides an easy-to-use debug log
component.

• Specifies a reference to Ingr SP3D DebugSupport v1.0 Library.


• Adds code to initialize and kill debug services.
• Adds helper routines to CommonSubs.bas to access the methods and properties of the
type library. This BAS file is automatically generated for your Visual Basic project.
• Includes a simple example in the Start method that shows you how to use the service.

Disable OnIdle in Debug - Adds code to the Start method to disable idle processing.

Disable OnIdle in Release - Adds code to the Start method to disable idle processing.

Helper routines
Convert string to GUID - Provides the ability to convert a string such as IJPlane and return its
GUID.

Convert device to model coordinates - Returns model coordinates from device coordinates.
Routines are added to the CommonSubs.bas file.

Convert model to device coordinates - Returns the device coordinates from model coordinates.
Routines are added to the CommonSubs.bas file.

Display status bar messages - Adds a reference to the Ingr sp3d CommonApp Utilities v1.0
Library, and includes the DisplayStatus procedure to assist in writing messages to the status
bar.

16 3D Command Wizard Programming Help


Welcome

Notification and Event Handlers

Command Wizard - Step 6


This step allows you to specify notifications and event-handlers, including GraphicViewMgr
event handlers. This step also includes SmartSketch3D support for mouse events and keyboard
notification.

Uses GraphicViewMgr events - Specifies GraphicViewMgr event handlers for your


command. Each event, such as MouseMove, contains, as part of its signature, the actual event
handler that generated the event. Thus, commands can "listen" to the event handlers (probably
what the command is interested in) rather than individual event handler objects. Each event has a
corresponding method. An event handler invokes this (hidden) method in response to its
experiencing a similar event. Thus, an event handler responds to the MouseMove event, and in
its MouseMove event handler, contains the following:
Parent.MouseMove Me, Button, Shift, X, Y

'/////////////////////////////////////////////////////////////////////////
'// Use RaiseEvent to pass it on to interested parties, such as commands.
'/////////////////////////////////////////////////////////////////////////
RaiseEvent MouseMove( generatingView, Button, Shift, X, Y )
The previous Event example is based on the one in the Visual Basic PictureBox object class.

Uses SmartSketch3D - Includes this functionality for your command. The SmartSketch3D
interface is the default interface for the CSmartSketch object. It provides the methods that
commands use in order to get a new position to place an object. This interface is also used to
determine how the QuickPick object is used with the CSmartSketch object.

Implements IJKeyboardListener - Defines keyboard listeners for your command. Keyboard


listeners are objects that are added to the keyboard listener collection of JMenuService
IJMenuService interface via its addKeyboardListener method.

addKeyboardListener(ByVal obj as IJKeyboardListener, ByVal F1Only As Boolean)

Objects expecting to become keyboard listeners must implement the IJKeyboardListener


interface. Any number of objects can become keyboard listeners at one time. Listeners are either
informed of all key-up and key-down actions or just F1 key-up and key-down actions. The Menu
service deletes all keyboard listeners at task switch or termination time. If this listener is already
present in the keyboard listener collection, it is not added again, but its F1Only state is changed
to the new F1Only argument value.

Parameter Data Type Description


obj IJKeyboardListener Object implementing IJKeyboardListener
to be added to collection of keyboard

3D Command Wizard Programming Help 17


Welcome

listeners.
F1Only Boolean Key-up or key-down actions (F1Only =
False), or just F1 key-up or key-down
actions (F1Only = True)

Events Available
When you select the Uses GraphicViewMgr events option , any of the following can be
selected as event handlers: MouseUp, MouseDown, MouseMove, KeyDown, KeyPress,
KeyUp, OnClose, Click, Double Click, GotFocus, Hide, LostFocus, Paint, Resize, or Show.

Default Set: MouseUp, MouseDown, and MouseMove

Event Handlers
Items appear according to GraphicViewMgr events that you select for your command.

18 3D Command Wizard Programming Help


Welcome

SmartStep Definition

Command Wizard - Step 7


This step allows you to define each of the SmartStep steps that your command will use.

Prompt and Selection Characteristics - SmartStep Definition 1

Constraints and Options - SmartStep Definition 2

Command uses SmartStep - Implements SmartStep functionality. This selection generates the
following changes to your command:

• References the Ingr SP3D SmartStep Cmd v2 Library.


• Defines and initializes the module variables m_CmdSmartStep and m_SmartCmdStep.
• Redirects all objects that are obtained from Trader to be obtained from
m_CmdSmartStep.Trader.
• Provides SmartStep initialization and definition code in the IJCommand2 and
IModifyCmd modules.
• Defines a public event in the ribbon project with code for the OnStepChange event
to trigger changes that are controlled by the ribbon.
• Usually defined in the Trader, variables are initialized instead from
m_cmdSmartStep, including:

Member Description
Trader Allows clients to access services exposed dynamically by
servers. The server exports functionality in the form of "Offers"
to the Trader component, and clients can query the Trader to
try and find a server to provide services that the client requires.
Services are found by "name" rather than identity, such as
CLSID.
CommandMgr The CommandManager permits the application to start, pause,
resume, and stop commands. The application can also set the
DefaultCommand property, which is defined as the only
command running. The CommandManager can be obtained
from the Trader using the key "CommandMgr" (no subkey).
WorkingSet Contains the various objects used to define and access the data
available to a client.

3D Command Wizard Programming Help 19


Welcome

ActiveConnection Provides read and write access to a database. When there is no


active connection, set ActiveConnection = Nothing.
GraphicViewMgr Provides support for the set of GraphicViews and consists of
only one object.
TransactionMgr Contains objects supporting the TransactionMgr service. The
TransactionManager object controls the transaction for
commit or abort, computes the result of changes, copies or
pastes objects, performs undo for recent transactions, and so
forth. The application creates this service and registers it in the
Trader (service="TransactionMgr", type = "").
SmartSketch3D Used to simplify placement and selection of objects for
relationships. For example, this functionality helps to place a
pump by locating the deck and then placing the pump.
Moreover, it assists to create the relationships between the deck
and the pump.
SmartSketchServer The solver behind the SmartSketch3D functionality. It
performs all the calculations for solving the constraints.
HourGlass IJDHourGlass is the interface that is used to change the active
cursor to an hourglass to notify the user that a process is still
running.

Select number of steps to define: Allows you to set the number of SmartStep steps that you
need for your command.

Change Step Settings


These options allow you to select specific SmartStep steps to define or edit. If the SmartStep
steps are not edited, then saved default settings will be used from the last step, Finish, page 25.

Select Step - Allows you to select the specific SmartStep step to be defined or edited.

Edit Step - Allows you to enter the two-step process of defining the SmartStep commands.

20 3D Command Wizard Programming Help


Welcome

Prompt and Selection Characteristics

Command Wizard - SmartStep Definition 1


This step allows you to begin SmartStep prompt and selection characteristics for your
command. This is the first of two steps in the definition of a selected SmartStep step.

Define prompt for step: You can specify the prompt to display when this step becomes active.
You should define its meaning to be concise and clear to the user in the context of the active
command.
'The command line for this option:
m_CmdSmartStep.Step(0).Prompt = "<i.e. Select stuff>"
Maximum selectable elements: You can specify a limited number of selectable elements for
your command. The default value is one. This option generates the following code:
m_CmdSmartStep.Step(0).MaxElements = (NoElements)
Enable QuickPick - Provides QuickPick functionality for your command and references the
Ingr SP3D ICDPInterfaces 1.0 Type Library and the Ingr SP3D QuickPick 1.0 Interface
Definition Type Library. This option generates the following code:
m_CmdSmartStep.step(0).QuickPickEnabled = True
Note: Checking the option Use SmartSketch3D disables the Enable QuickPick option and vise
versa.

You can use the QuickPick component in commands that need to present the user with a
graphical user interface (GUI) element for choosing among multiple objects. To achieve this
interaction, the SelectCmd object uses certain features of QuickPick. The QuickPick
component does not perform all of the feedback alone. In addition, QuickPick provides events
and methods that allow the command to perform necessary functionality.

Enable fence-locate - Provides the ability to use a fence to locate a select set. This option adds
the following to your command:
m_CmdSmartStep.step(0).FenceEnabled = True
If the property is set to False, a fenced selection is ignored.

Use SmartSketch3D - Allows your command to use SmartSketch3D functionality. This option
adds the following to your command:
m_CmdSmartStep.Step(0).SmartSketchOn = True
If this property is set to True, then a number of SmartSketch3D options are enabled and defined
in your code in the SmartStep Definition 2, Constraints and Options, page 23.

Listen for step List modifications - Allows your command to reference methods on the
IJElemsByMonikerModified interface as listeners to modifications in the elements collection.

3D Command Wizard Programming Help 21


Welcome

These methods are called when any object is selected in the graphic view. This option allows
your command to process things such as enabling and disabling controls, selection validation,
and so forth.

Listen for step HilitedElements modifications - This event is valid only for the SmartStep
definition. It is triggered when the elements list is hilited. The list count is zero when no element
is hilited.

HilitedElements(ByVal elements As IJElements, ByVal position As IJDPosition)

Parameter Data Type Description


elements IJElements The interface of the first element in a collection.
position IJDPostion The interface of the first element's position. It represents
the world position of the mouse if this step does not use
SmartSketch3D. Otherwise, it is the position returned
by SmartSketch3D itself.

Use step Filter:

This option allows you to define a filter string for your command. Step Filter allows selection to
be limited only to the ClassIDs provided in the filter list.

Filter criteria:
If you check Use step Filter, you must complete this text box. Following are valid examples you
can enter for this option:

IJPipe AND IJEquipment or IJPipe OR IJEquipment

22 3D Command Wizard Programming Help


Welcome

Constraints and Options

Command Wizard - SmartStep Definition 2


This step allows you to select and define SmartSketch3D functionality options and constraints.
You must check Use SmartSketch3D on the SmartStep Definition 1 for most of these options
to be enabled.

Assisting position ON - Enables SmartSketch3D functionality to display helper glyphs


(relationship indicators) and extensions. This display is dependent on the selection of other
options in this step.

Projection ON - Enables SmartSketch3D functionality to draw extension lines from straight


elements. This serves as a design aide when the cursor is positioned along the same axis.

NoPointGenerated event - Adds the NoPointGenerated event declaration to your command.


This event is called when no point is generated and returned by the SmartSketch3D
functionality.

Point creation ON - Generates a temporary graphic point in the code by which SmartSketch3D
functionality returns a coordinate. This option is for commands that do not need to select
elements.

Supply user-defined point-maker:


This option allows you to use special SmartSketch3D functionality to generate any points that
are returned. You should enter the module name in the text box to be called for this functionality.
If you do not select this option, then vbNullString is defined. This means the default point
generator is used when required.

Supply default point if no point returned - Allows the default point to be returned if the user-
defined point maker fails to return a point.

Enable SmartSketch3D constraints


The following SmartSketch3D constraint options can be selected for your command. These
glyphs (relationship indicators) are displayed as the cursor moves over and around existing
graphics displayed in the GUI. For more information about these glyphs, see "Changing the
View Options: An Overview" section in the Common User's Guide.

Center point

Key point

Horizontal

3D Command Wizard Programming Help 23


Welcome

Intersection

Point on curve

Mid point

Offset

Parallel

Perpendicular

24 3D Command Wizard Programming Help


Welcome

Finish
This step allows you to build your command based on all settings you have selected.

Save current settings as default - Saves all the settings that you selected to be the default
settings.

3D Command Wizard Programming Help 25


Index

Index
Command Wizard creating commands
creating commands, 5 Command Wizard, 5

26 3D Command Wizard Programming Help

Вам также может понравиться