SP 3 Dprogguide 082014-1
SP 3 Dprogguide 082014-1
Programmer’s Guide
Documentation
Documentation shall mean, whether in electronic or printed form, User’s Guides, Installation Guides, Reference
Guides, Administrator’s Guides, Customization Guides, Programmer’s Guides, Configuration Guides and Help
Guides delivered with a particular software product.
Other Documentation
Other Documentation shall mean, whether in electronic or printed form and delivered with software or on
eCustomer, SharePoint, or box.net, and documentation related to work processes, workflows, and best practices that
is provided by Intergraph as guidance for using a software product.
Terms of Use
a. Use of software product and Documentation is subject to the End User License Agreement (EULA) delivered
with software product unless the Licensee has a valid signed license for this software product with Intergraph
Corporation. If the Licensee has a valid signed license for this software product with Intergraph Corporation,
the valid signed license shall take precedence and govern the use of this software product and Documentation.
Subject to the terms contained within the applicable license agreement, Intergraph Corporation gives Licensee
permission to print a reasonable number of copies of the Documentation as defined in the applicable license
agreement and delivered with the software product for Licensee’s internal, non-commercial use. The
Documentation may not be printed for resale or redistribution.
b. For use of Documentation or Other Documentation where end user does not receive a EULA or does not have a
valid license agreement with Intergraph, Intergraph grants the Licensee a non-exclusive license to use the
Documentation or Other Documentation for Licensee’s internal non-commercial use. Intergraph Corporation
gives Licensee permission to print a reasonable number of copies of Other Documentation for Licensee’s
internal, non-commercial use. The Other Documentation may not be printed for resale or redistribution. This
license contained in this subsection b) may be terminated at any time and for any reason by Intergraph
Corporation by giving written notice to Licensee.
Disclaimer of Warranties
Except for any express warranties as may be stated in the EULA or separate license or separate terms and
conditions, Intergraph Corporation disclaims any and all express or implied warranties including, but not limited to
the implied warranties of merchantability and fitness for a particular purpose and nothing stated in, or implied by,
this document or its contents shall be considered or deemed a modification or amendment of such disclaimer.
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, Documentation and Other Documentation discussed in this document are furnished under a license
and may be used or copied only in accordance with the terms of this license. THE USER OF THE SOFTWARE IS
EXPECTED TO MAKE THE FINAL EVALUATION AS TO THE USEFULNESS OF THE SOFTWARE IN HIS
OWN ENVIRONMENT.
Intergraph is not responsible for the accuracy of delivered data including, but not limited to, catalog, reference and
symbol data. Users should verify for themselves that the data is accurate and suitable for their project work.
Limitation of Damages
IN NO EVENT WILL INTERGRAPH CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT,
CONSEQUENTIAL INCIDENTAL, SPECIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED
TO, LOSS OF USE OR PRODUCTION, LOSS OF REVENUE OR PROFIT, LOSS OF DATA, OR CLAIMS OF
THIRD PARTIES, EVEN IF INTERGRAPH CORPORATION HAS BEEN ADVISED OF THE POSSIBILITY
OF SUCH DAMAGES.
UNDER NO CIRCUMSTANCES SHALL INTERGRAPH CORPORATION'S LIABILITY EXCEED THE
AMOUNT THAT INTERGRAPH CORPORATION HAS BEEN PAID BY LICENSEE UNDER THIS
AGREEMENT AT THE TIME THE CLAIM IS MADE. EXCEPT WHERE PROHIBITED BY APPLICABLE
LAW, NO CLAIM, REGARDLESS OF FORM, ARISING OUT OF OR IN CONNECTION WITH THE
SUBJECT MATTER OF THIS DOCUMENT MAY BE BROUGHT BY LICENSEE MORE THAN TWO (2)
YEARS AFTER THE EVENT GIVING RISE TO THE CAUSE OF ACTION HAS OCCURRED.
IF UNDER THE LAW RULED APPLICABLE ANY PART OF THIS SECTION IS INVALID, THEN
INTERGRAPH LIMITS ITS LIABILITY TO THE MAXIMUM EXTENT ALLOWED BY SAID LAW.
Export Controls
Intergraph Corporation's software products and any third-party Software Products obtained from Intergraph
Corporation, its subsidiaries, or distributors (including any Documentation, Other Documentation or technical data
related to these products) are subject to the export control laws and regulations of the United States. Diversion
contrary to U.S. law is prohibited. These Software Products, and the direct product thereof, must not be exported or
re-exported, directly or indirectly (including via remote access) under the following circumstances:
a. To Cuba, Iran, North Korea, Sudan, or Syria, or any national of these countries.
b. To any person or entity listed on any U.S. government denial list, including but not limited to, the U.S.
Department of Commerce Denied Persons, Entities, and Unverified lists, the U.S. Department of Treasury
Specially Designated Nationals List, and the U.S. Department of State Debarred List.
c. To any entity when Licensee knows, or has reason to know, the end use of the Software Product is related to the
design, development, production, or use of missiles, chemical, biological, or nuclear weapons, or other un-
safeguarded or sensitive nuclear uses.
d. To any entity when Licensee knows, or has reason to know, that an illegal reshipment will take place.
Any questions regarding export or re-export of these Software Products should be addressed to Intergraph
Corporation's Export Compliance Department, Huntsville, Alabama 35894, USA.
Trademarks
Intergraph, the Intergraph logo, Intergraph Smart, PDS, SmartPlant, SmartMarine, FrameWorks, I-Sketch,
IntelliShip, ISOGEN, SmartSketch, SPOOLGEN, SupportManager, and SupportModeler are trademarks or
registered trademarks of Intergraph Corporation or its subsidiaries in the United States and other countries.
Microsoft and Windows are registered trademarks of Microsoft Corporation. MicroStation is a registered trademark
of Bentley Systems, Inc. Other brands and product names are trademarks of their respective owners.
Intergraph Policy Against Software Piracy
When you purchase or lease Intergraph software, Intergraph retains ownership of the product. You become the
licensee of the product and obtain the right to use the product solely in accordance with the terms of the Intergraph
Software License Agreement and the provisions of the various copyright laws.
You must have a valid license for each working copy of the product. You may also make one archival copy of the
software to protect from inadvertent destruction of the original software, but you are not permitted to use the
archival copy for any other purpose. An upgrade replaces the original license. Any use of working copies of the
product for which there is no valid Intergraph Software License Agreement constitutes Software Piracy for which
there are very severe penalties. All Intergraph software products are protected by copyright laws and international
treaty.
If you have questions regarding software piracy or the legal use of Intergraph software products, please call the
Intergraph Legal Department at 256-730-2333.
Updated July, 2003. Document No. DDGL562B0
Table of Contents
Table of Contents
Preface.................................................................................................................................7
Smart 3D Product Documentation................................................................................8
Administrative Guides ........................................................................................................ 8
Documentation Comments ...........................................................................................9
Introduction......................................................................................................................10
Visual Basic .NET™ ........................................................................................................ 10
What's New in Programming Resources ....................................................................11
Command Priorities.........................................................................................................24
Error Handling.................................................................................................................25
Error Log Component.................................................................................................26
IJDwgExternalModule...................................................................................................... 78
IJDwgWrapperCompound ................................................................................................ 79
IJDwgWrapperPseudoFilter.............................................................................................. 79
DefineNozzle Method...............................................................................................169
DefinePlacePoint Method.........................................................................................170
DefinePoint Method..................................................................................................171
DrawArc Method ......................................................................................................172
DrawComplexSurface Method .................................................................................173
DrawLine Method.....................................................................................................174
InitializeGlobals Method ..........................................................................................174
MoveAlongAxis Method ..........................................................................................175
MoveToPlacePoint Method ......................................................................................175
NozzleDefineDirectionVector Method.....................................................................176
NozzleInitialize Method ...........................................................................................176
NozzlePlace Method.................................................................................................177
RotateOrientation Method ........................................................................................178
Index................................................................................................................................189
Preface
This document is a user's guide for programming and customization using Intergraph
Smart™ 3D and provides information about custom commands, naming rules, project
management, symbol programming, and drawings customization.
Administrative Guides
Intergraph Smart ™ 3D Installation Guide - Provides instructions on installing and
configuring the software.
Reference Data Guide - Provides instructions about the Bulkload utility and the
reference data common to several disciplines.
Documentation Comments
Send documentation comments or suggestions to [email protected].
Introduction
The Intergraph Smart 3D Programmer's Guide provides introductory information to
developers who want to create custom commands or custom programs using special
tools and the software. Before creating commands or programs, you must 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.
In the Debugging Your Code section are instructions for users to increase the stack size
for Visual Basic before debugging IFC rules.
Software Architecture
The software has an architecture that is component-oriented and built on three tiers.
The software makes extensive use of the Microsoft® Component Object Model, or
COM. The COM paradigm is deeply rooted in the idea of separating the interface of
an object from its data. Interface names, such as IUnknown, IDispatch, and so forth,
begin with the letter I by convention. Interfaces developed in the software always
begin with IJ, such as IJAppInfo. The J distinguishes interfaces from other sources
and reduces the risk of namespace collision.
Because the software is task-oriented, it uses one datastore. The datastore is the entity
that stores the data of the persistent business object instances. The term task-oriented
means that, rather than developers producing one large executable file or several
smaller ones, all the major functional subdivisions of the software are built as
separable COM objects. These "COMponents" are known as tasks. One datastore
means that all these separate tasks operate against a single underlying database.
Three-Tier Architecture
The three-tier architecture of the software includes the client, middle, and server tiers.
These tiers separate the graphical user interface, or GUI, stored in the client tier, from
the business logic in the middle tier. The business logic is further separated from the
physical database in the server tier.
Client Tier
The client tier's functionality is loaded on user demand in the form of tasks, services,
and commands.
The client tier contains the menus, toolbars, views, dialog boxes, and frames. In the
client tier, you can manipulate the GUI with services, such as the SelectSet and
GraphicViewMgr, and with software-supplied components, such as Locators,
Highlighters, and View manipulations.
A set of commands make up each task in the client tier. Eighty to ninety percent of
the code in a task is written in the form of a command or to support a command.
Each task has its own COMponent called the EnvironmentMgr and an associated
XML file. This XML file defines the look and feel for the task and specifies the
services that it uses.
Services and other components support the commands and tasks by providing a set of
commonly-used functionalities. Services should respond to task switches. When a
task starts or ends, services are notified of the event to initialize or to clean up.
A service can persist its state in a session file when the session file is saved. The
SessionMgr, a service, coordinates this activity. When a session is saved,
SessionMgr checks each service to see if it supports an interface for persistence. If
the service does support an interface for persistence, then this interface is called to
allow the service to save persistent information. When the SessionMgr loads a
session file, the reverse happens - the SessionMgr first creates the service; then, if the
service can persist, SessionMgr calls the service to restore saved information.
For more information about session files, see the Managing Sessions: An Overview
section of the Common User's Guide.
Relationships define how business objects interact with each other. The following are
examples of this interaction:
The RevisionMgr works in cooperation with the business objects and relationships
by detecting changes to business objects. Using the relationships that business objects
are involved in, the RevisionMgr declares changes to any business objects defined as
outputs of the relationships. The RevisionMgr continues this promulgation until all
affected business objects are up-to-date.
The RevisionMgr notifies the TransactionMgr, a client tier service, after all
affected business objects have been modified. The TransactionMgr in turn notifies
any client tier services that are listening.
Server Tier
The server tier is made up of one or more physical datastores.
The server tier also provides storage for the metadata, which is contained in the
Repository. The Repository is the name of the location in which all the UML data is
saved. Metadata is the total description of all the classes, interfaces, relationships, and
semantics in the system.
Getting Started
Before you begin customizing the software, you should be familiar with the
following:
You can also use any language of your choice that is OLE compliant such as C#,
C++, J++, Smalltalk, Fortran, Cobol, and so forth. However, examples and
documentation are provided in Visual Basic 6.0 format only.
For additional sources of documentation, online training, and code samples, you can
connect to the internet and download files or read to learn more. For example, you
can access information about the following:
Printed Documentation
Hardcore Visual Basic, Microsoft Press. Also available from the MSDN
Library.
Advanced Microsoft Visual Basic 6.0, Microsoft Press. Also available
from the MSDN Library.
You perform the process of locating and fixing bugs in applications by debugging the
code. Visual Basic provides several tools to help analyze how your application
operates. These debugging tools are useful in locating the source of bugs, but you can
also use the tools to experiment with changes to your application or to learn how
other applications work.
Note: You must add the TaskHost project to the integrated development environment
(IDE) before you can debug your Visual Basic project.
Before you can use the TaskHost project, you must set new paths in your computer's
environment variables. Click Start > Settings > Control Panel > System. Select the
Advanced tab and then click Environment Variables. Finally add the following path
statements according to the location in which you installed the software:
Do not stop the debug process by clicking the End command. If you end processing
this way, you will throw an exception, crash all the software that is running, and lose
your changes.
To safely end processing, click File > Exit from the Smart 3D TaskHost software.
For more specific information about using the TaskHost project and creating
commands using the software's application programming interface (API), please
contact Intergraph Services.
IFC Rules
Before debugging IFC post processor rules, you must increase the stack size by 4
megabytes for Visual Basic. The default value is only 1 megabyte, but IFC rules
require a minimum of 4 megabytes of stack memory.
Using the Command prompt, run the following command to increase the stack size:
$EDITBIN.exe /stack:4096000 /heap:65536 "[VB 6.0 Installation
folder]\VB98\VB6.EXE"; default: ($EDITBIN.exe /stack:4096000 /heap:65536
"C:\Program Files (86)\Microsoft Visual Studio\VB98\VB6.EXE").
Early Binding
A client program can access this information at design time by statically binding to
the ClassID of the classes in the type library. This process is called "early binding".
The ClassID is a unique name given to each object class at compile time, representing
the status of the exposed methods and properties on the binary level. A binary-
compatible version of the type library retains the same ClassIDs, which indicates that
the binary footprint of all the methods and properties remains unchanged and
backward compatible.
Late Binding
If binary compatibility is not guaranteed, then the client program cannot statically
bind itself to the ClassID. Instead it must query the object at runtime to verify that it
continues to support the methods and properties required by the client. This
verification is called "late binding".
Command Priorities
When a command is started, it is assigned a priority, and (if successfully started) a
command ID is returned. Note that commands do not possess an intrinsic priority.
They are assigned one by the task that starts them. Thus, it is possible to start the
same command with different priorities in two different tasks. However, you should
avoid this practice unless there is a valid reason for this kind of implementation.
The priority is used to determine the stacking that can be done in conjunction with the
command. If the command being started is given a higher priority than the currently
active command, and the current command is suspendable (stackable), then the
current command is (suspended) stacked. If the current command is not suspendable,
or if its priority is equal to or less than the command being started, the current
command is stopped.
There are three possible priority values: Low, Normal, and High.
Caution:
Error Handling
Trapping and resolving errors is one of those tasks that all developers must address. It
is important to remember several guidelines when you add code to your projects for
error handling.
This component provides dual error tracking for the software. It can assist when
trouble-shooting problems at a customer site as well as a debugging tool during
Visual Basic project development.
Enter a class or variable name to search - Text can be the complete name or the
first few letters of the item that you want to locate.
I-> Result
If your search finds a match, it returns an output dialog consisting of columns that
contain the member name, the type library's complete file path and name, and the
type library description.
Typelib Description - Matches the name that you can find in Available References,
when you click Project > References.
Display Options
Click to display a popup menu that provides two options: Exact Search
and Update Data.
Exact Search - Off by default and cannot be toggled on permanently. When it is
toggled off, and you enter IJCopy in the text box, the tool returns all references that
are related to this name. You must click Exact Search to return only the member
name IJCopy.
Update Data - Allows you to update your data file. When you update your system
with new or changed type libraries, you need to select this command to regenerate
your data file.
If you select the Project > Speedy References command, and it does not
display the utility, then the last screen position of the tool stored in the
Registry is out of the current screen resolution. To resolve this problem,
exit from all Visual Basic programs, and remove the following Registry
key:
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Speedy
References
This Registry key will be re-created when you start Visual Basic 6 again.
The Command Wizard and Speedy References tool are each very useful in creating
custom commands.
The Command Wizard and Speedy References tool are delivered as part of the
Programming Resources. Refer to the Intergraph Smart ™ 3D Installation Guide for
information on installing the Programming Resources components.
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.
The Speedy References tool allows you to locate and reference type libraries quickly
and easily. The ability to reference a type library with this tool saves valuable time
otherwise required when searching using the Project > References command in your
Visual Basic project.
Undo Functionality
The TransactionManager service in the software provides the ability to perform
undo functionality in addition to other kinds of transaction notifications such as
commit, abort, or compute.
When you develop a custom command that requires undo functionality, be sure to
include a string in your project that serves as the marker for undo capability.
'////////////////////////////////
'Example of undo
'////////////////////////////////
Dim strPlacePipe As String
oTransaction.Commit(strPlacePipe)
You can use an interface to create a reference to an object, but not the object itself.
An interface specifies the functionalities that are guaranteed by an object. One of the
advantages in using an interface is that it allows objects to grow without breaking
earlier functionality, as long as the objects continue to implement the original
interfaces.
The purpose of using interfaces is to encapsulate details (data layout) of the class's
implementation, instead of using data members, to which dependencies can be built.
Note: More than one class can implement the same interface.
Creating an Implementation
Create an ActiveX project as a DLL.
Reference the abstract class.
Include the Implements keyword followed by the name of the abstract
class inside the implementation class module, as follows:
Option Explicit
Implements <Abstract_Class_Name>
Implement your functions and properties of the abstract class in the new
class.
Note: An Excel workbook contains the naming rule definitions, which is provided so
that the naming rules can be loaded into the Catalog database. For information about
the workbook implementation, see the section titled Naming Rules Reference Data:
An Overview in the Reference Data Guide available from the Help > Printable
Guides command in the software.
You can use the following COM objects to create new naming rules:
NameGeneratorService
NamingRulesHelper
CNameRuleAE
The following sections define the minimal set of references that a custom naming rule
needs to have referenced in the Visual Basic project.
Important: When creating naming rules or using labels as weld identifiers for
isometric drawings, there must not be any spaces generated in the identifier.
IJNameRule Interface
The IJNameRule interface supports the naming rule implementation for the
GSCADNameRuleSemantics component. The IJNameRule interface is
implemented as the actual naming rule.
The IJNameRule interface, which implements the naming rule, contrasts with the
IJDNameRuleHolder interface, which holds the naming rule name.
ComputeName Method
Description
Signature
Important: When creating naming rules or using labels as weld identifiers for
isometric drawings, there must not be any spaces generated in the identifier.
GetNamingParents Method
Description
This method returns the naming parents from which the name should be derived.
Signature
CNameRuleAE Object
The CNameRuleAE object is the active entity for the name rule. An active entity
serves as the hub or management node for relationships in the software.
The relationship mechanism maintains data model consistency when entities are
modified, copied, or deleted. This mechanism maintains referential integrity when
entities are created, connected, or disconnected.
The CNameRuleAE object is created by the system and is passed to the Custom
Name Rule component.
IJNameRuleAE Interface
The IJNameRuleAE interface supports the naming rule implementation for the
GSCADNameRuleSemantics component.
Frozen Property
Description
This property returns whether the name of the object is frozen or not.
Signature
Frozen As Long
NamingParentsString Property
Description
This property returns the naming parents string, which contains the Base Name.
Signature
NamingParentsString As String
Important: When creating naming rules or using labels as weld identifiers for
isometric drawings, there must not be any spaces generated in the identifier.
Remarks
This string is returned after generating the name of an object. Then it is used with the
ComputeName method of the IJNameRule interface to decide whether there should
be a new index number created.
NameGeneratorService Object
The NameGeneratorService class supports the naming rule implementation for the
GSCADNameGenerator component.
This class is the middle tier service that implements the IJNameCounter interface.
IJNameCounter Interface
The IJNameCounter interface supports the naming rule implementation for the
GSCADNameGenerator component.
GetCount Method
Description
This method returns a new index number when the NamingParentsString property
of the IJNameRuleAE interface and the current base name are different.
Signature
Remarks
If the base name is found in the database, the counter is incremented by one. If not, a
new object is created and the count is returned as one.
GetCountEx Method
Description
This method returns a new index number when the NamingParentsString property
of the IJNameRuleAE interface and the current base name are different.
Signature
Remarks
If the base name is found in the database, the counter is incremented by one. If not, a
new object is created and the count is returned as one.
GetCountRange Method
Description
The GetCountRange method returns a unique index to a counter based on the base
name and an option to customize the user range.
This method is similar to the GetCountEx method except that the user range received
from the COM server can be customized. To reduce gaps between numbers, a lesser
value than ten (default) can be passed in for user range. If less than ten is entered,
more DCOM calls will be made to the COM server, which impacts performance.
Signature
Remarks
Error Codes
NamingRulesHelper Object
The NamingRulesHelper object is the middle tier service that implements the
IJDNamingRulesHelper interface.
IJDNamingRulesHelper Interface
The IJDNamingRulesHelper interface is used by commands to associate a business
object to a name rule and to determine if a name is unique.
The other methods listed are used by commands that are assigning a name rule to an
object or getting a list of name rules for a specific object type.
AddNamingRelations Method
Description
This method adds naming relations after creating the active entity and returns a
reference to the IJNameRuleAE interface of the active entity object created. The
method deletes the active entity if it is there before creating the new one so it can also
be used to delete the relations. If nothing is sent as the pNameRuleHolder argument,
the method deletes the existing relations.
Signature
GetActiveNamingRule Method
Description
Signature
GetEntityNamingRulesGivenName Method
Description
This method returns a reference to the IJElements interface of the first object in a
collection of the naming rules. These rules are available in the Catalog database for
the given object name input.
Signature
Important: When creating naming rules or using labels as weld identifiers for
isometric drawings, there must not be any spaces generated in the identifier.
GetEntityNamingRulesGivenProgID Method
Description
This method returns a reference to the IJElements interface of the first object in a
collection of the naming rules. These rules are available in the Catalog database for
the given class ProgID input.
Signature
IsGeneratedNameUnique Method
Description
Signature
Important: When creating naming rules or using labels as weld identifiers for
isometric drawings, there must not be any spaces generated in the identifier.
Remarks
This method is typically used by a custom name rule to verify that the name is
unique. It is typically only used when one of the methods on the
IJNameRuleCounter interface is not used to return a unique counter for a name.
Object/Interface Methods
IJHgrAutomation CreateSupport
ModifySupport
IJHgrAutomation Interface
The IJHgrAutomation interface supports the creation and modification functionality
for the HgrSupProgAutoComp component.
CreateSupport Method
CreateSupport Method Example, page 54
Description
Signature
Remarks
If bRule and oSupportAssembly are specified, then the support assembly is considered
only when the rule fails. If strSupportName and strSupportRuleName are given, then
strSupportName is ignored.
ModifySupport Method
Description
Signature
Remarks
If bRule and oSupportAssembly are specified, then the support assembly is considered
only when the rule fails. If strSupportName and strSupportRuleName are given, then
strSupportName is ignored.
'/////////////////////////////////////////////////////////////////////////
'// System, supported objects, supporting objects, and support assembly
'// to be supplied by user.
'////////////////////////////////////////////////////////////////////////
Set oHgrSupport = oHgrAutomation.CreateSupport(1, oSystem, 10#,
SupportedList, _
SupportingList, Nothing, True, oSupportAssembly, "Automation")
- - - -
- - - -
- - - -
- - - -
'/////////////////////////////////////////////////////////////////////////
'// Set the maximum load for the support with the MaxLoad method
'////////////////////////////////////////////////////////////////////////
oHgrSupport.MaxLoad = 10.0
Object/Interface Methods
ProjectMgmtEntitiesFactory AddLocation
AttachPDSProject
CreateProjectRoot
CreateModelDatabaseObject
CreateCatalogDatabaseObject
CreateFolder
CreatePermissionGroup
CreateAccessControlRule
CreateReportsDatabaseObject
CreateDBObject
GetNameGeneratorServerPath
GetPDSSite
ValidateNameServer
IJHierarchy GetDisplayChildren
Parent
IJAccessRuleHelper AddAccessControlRule
IJBackupRestoreHelper BackupPlantDatabases
RestorePlantDatabases
ProjectMgmtEntitiesFactory Object
The ProjectMgmtEntitiesFactory object provides the methods in which to create
objects such as Plant/Ship, Folder, Permission Group, Access Control Rule, and
so forth.
To begin using this object, reference Ingr Sp3d ProjectMgmtEntities 1.0 Type
Library, ProjectMgmtEntities.dll, in the Visual Basic project.
'///////////////////////////////////////////////////
'// Example using ProjectMgmtEntitiesFactory object
'///////////////////////////////////////////////////////////////////
Dim oProjectMgmtEntitiesFactory As IJProjectMgmtEntitiesFactory
Set oProjectMgmtEntitiesFactory = New ProjectMgmtEntitiesFactory
AddLocation Method
Description
Signature
Remarks
You must define the project connection as the active connection on the WorkingSet.
AttachPDSProject Method
Description
This method references a PDS project (Model) to the selected model (Plant/Ship).
Signature
Remarks
You must set the permission group ID of the Project Root = active condition ID and
the project connection = active connection on the WorkingSet. There can be only one
PDS project attached (referenced) to a plant/ship.
CreateProjectRoot Method
Description
Signature
Remarks
You must define the project connection = active connection and the condition ID on
the WorkingSet = "8" (PROJMGMT_PERMISSIONID).
Error Codes
E_ACCESSDENIED = -2147024891
CreateModelDatabaseObject Method
Description
Signature
Remarks
You must define the project connection = active connection on the WorkingSet.
Error Codes
lDISK_NO_SPACE = -2147216355
E_ACCESSDENIED = -2147024891
CreateCatalogDatabaseObject Method
Description
Signature
Remarks
You must define the project connection = active connection on the WorkingSet.
Error Codes
E_ACCESSDENIED = -2147024891
CreateFolder Method
Description
Signature
Remarks
If the folder is created under another folder, the Input folder parent object should be
set = "Nothing".
Error Codes
E_INVALIDHIERARCHY = -2147220224
E_ACCESSDENIED = -2147024891
CreatePermissionGroup Method
Description
Signature
Remarks
You must define the project connection = active connection on the WorkingSet.
Error Codes
E_INVALIDHIERARCHY = -2147220224
E_ACCESSDENIED = -2147024891
CreateAccessControlRule Method
Description
Signature
Remarks
Error Codes
E_ACCESSDENIED = -2147024891
CreateReportsDatabaseObject Method
Description
Signature
Remarks
You must define the project connection = active connection on the WorkingSet.
Error Codes
lDISK_NO_SPACE = -2147216355
E_ACCESSDENIED = -2147024891
IJHierarchy Interface
In addition to creating objects, GetDisplayChildren and GetParent methods of the
IJHierarchy interface allow you to return the collection of plant objects and, given a plant
object, to traverse the project folders and permission groups.
The classes that implement the IJHierarchy interface are ProjectCollection, ProjectRoot,
Database, Folder and PermissionGroup classes respectively.
'/////////////////////////////////////////////////////////////////////////
'// Example using methods of IJHierarchy and the ProjectCollection object.
'// Similarly, use the GetParent method to return the parent.
'///////////////////////////////////////////////////////////////////////
Dim oProjectsColl as IJProjectsCollection
Set oProjectsColl = oProjMgmtfactory. GetProjectsCollectionObject _
(oConnection.ResourceManager)
Dim oHierarchy As IJHierarchy
Set oHierarchy = oProjectsColl
Dim oChildren as IJDObjectCollection
GetDisplayChildren Method
Description
Signature
Remarks
Parent Property
Description
Signature
Parent As Object
IJAccessRuleHelper Interface
The IJAccessRuleHelper interface provides the means for access control rules to be
added.
AddAccessControlRule Method
Description
Signature