Modules | Classes | Typedefs | Enumerations | Enumerator | Functions
I-models

The i-model publish library provides APIs to publish and package i-model. More...

Modules

 I-model IPC connection
 The i-model connection library provides APIs to connect Engine from host application.
 

Classes

struct  IModelPublisher
 The actual i-model publishing engine through which user can specify the publish and package options and start the publishing and packaging process. More...
 
struct  PackageOptions
 Specifies the packaging and protection options to apply to a packaged i-model. More...
 
struct  PublishViewOptions
 Specifies the publishing view options to apply while creating the published i-models. More...
 
struct  PublishOptions
 Specifies the publishing options to apply while creating the published i-models. More...
 
struct  DgnDbOptions
 Specifies the DgnDb options to apply while creating the published i-models. More...
 
struct  IIModelEngineInfoProvider
 IIModelEngineInfoProvider must be implemented in-order to provide engine name and engine version.Engine name and engine version visible in provenance information of published/packaged files. More...
 
struct  DgnIconLibsProvider
 DgnIconLibsProvider must be implemented in-order to provide Icons data for published/packaged files. More...
 
struct  IDgnFileSupplyRightProvider
 IDgnFileSupplyRightProvider must be implemented in-order to provide credentials to protected DGN files. More...
 
struct  IIModelPublishingProvider
 IModelPublisher object utilizes some additional and optional interfaces implementation.IIModelPublishingProvider groups all interfaces implementation. More...
 

Typedefs

typedef IModelPublisher const & IModelPublisherCR
 
typedef IModelPublisher & IModelPublisherR
 
typedef IModelPublisher * IModelPublisherP
 
typedef RefCountedPtr
< IModelPublisher > 
IModelPublisherPtr
 
typedef PackageOptions const & PackageOptionsCR
 
typedef PackageOptions & PackageOptionsR
 
typedef PublishOptions const & PublishOptionsCR
 
typedef PublishOptions & PublishOptionsR
 
typedef DgnDbOptions const & DgnDbOptionsCR
 
typedef DgnDbOptions & DgnDbOptionsR
 
typedef PublishViewOptions const & PublishViewOptionsCR
 
typedef PublishViewOptions & PublishViewOptionsR
 
typedef bvector< WString > EmbedDocumentList
 
typedef EmbedDocumentList & EmbedDocumentListR
 
typedef StatusInt(* OverrideProvenanceSourceEvent )(WString &, WCharCP)
 A callback for overriding provenance source. More...
 
typedef StatusInt(* OverrideProvenanceTargetEvent )(WString &, WCharCP)
 A callback for overriding provenance target. More...
 
typedef void(* OnErrorCallbackEvent )(WCharCP)
 A callback for reporting errors during a publish or package operation. More...
 
typedef StatusInt(* ProcessFileCallback )(DgnFileCR, DgnFilePtr &)
 A callback for processing a file and substituting with another one. More...
 
typedef StatusInt(* AddProvenanceConfigMetaDataCallback )(WString &)
 
typedef RefCounted
< IIModelPublishingProvider > 
IIModelPublishingProviderPtr
 
typedef IIModelPublishingProvider & IIModelPublishingProviderR
 
typedef IIModelPublishingProvider * IIModelPublishingProviderP
 
typedef RefCounted
< DgnIconLibsProvider > 
DgnIconLibsProviderPtr
 
typedef DgnIconLibsProvider & DgnIconLibsProviderR
 
typedef DgnIconLibsProvider * DgnIconLibsProviderP
 
typedef RefCounted
< IDgnFileSupplyRightProvider > 
IDgnFileSupplyRightProviderPtr
 
typedef
IDgnFileSupplyRightProvider & 
IDgnFileSupplyRightProviderR
 
typedef
IDgnFileSupplyRightProvider * 
IDgnFileSupplyRightProviderP
 
typedef RefCounted
< IIModelEngineInfoProvider > 
IIModelEngineInfoPtrProvider
 
typedef IIModelEngineInfoProvider & IIModelEngineInfoProviderR
 
typedef IIModelEngineInfoProvider * IIModelEngineInfoProviderP
 

Enumerations

enum  LicenseType { LICENSE_Everyone = 0, LICENSE_Password = 1, LICENSE_Certificate = 2, LICENSE_None_ProtectionDisabled = 99 }
 Different possible License Types that can be used in PackageOptions. More...
 
enum  IModelStatus {
  IMODEL_Success = 0, IMODEL_ImporterNotFound = 1, IMODEL_ImporterNotSupported = 2, IMODEL_PackageFileNotFound = 3,
  IMODEL_MobileIModelFileExtension = 4, IMODEL_AccessViolation = 5, IMODEL_Error = 99
}
 Different possible error types that can be used returned by DgnDb publishing. More...
 

Functions

PUBLISHLIB_EXPORT PublishOptionsR GetPublishOptionsR ()
 Gets a reference of the current PublishOptions. More...
 
PUBLISHLIB_EXPORT PackageOptionsR GetPackageOptionsR ()
 Gets a reference of the current PackageOptions. More...
 
PUBLISHLIB_EXPORT DgnDbOptionsR GetDgnDbOptionsR ()
 Gets a reference of the current DgnDbOptions. More...
 
static PUBLISHLIB_EXPORT
IModelPublisherPtr 
Create (DgnDocumentCR dgnDocument, IIModelPublishingProviderR providerInstance)
 Creates an instance of IModelPublisher that you can use to publish and package an i-model. More...
 
PUBLISHLIB_EXPORT StatusInt Publish ()
 Publishes the file which was specified in IModelPublisher::Create method of IModelPublisher. More...
 
PUBLISHLIB_EXPORT StatusInt PublishAndPackage (DgnDocumentR packageDocument)
 First publishes and then packages all the published i-models created for the master design file (and all its attached references). More...
 
PUBLISHLIB_EXPORT IModelStatus PublishDgnDbIModel (WStringCR packageFileName, DgnDocumentR dotIModelDocument)
 Converts a V8i i-model with .i.dgn extension to the DgnDb i-model (.imodel) format. More...
 
PUBLISHLIB_EXPORT StatusInt EmbedDocumentsInPackage (EmbedDocumentListR documentList)
 Once Package file is create, some additional Documents can be embedded in packaged file. More...
 
PUBLISHLIB_EXPORT StatusInt EmbedDocumentInPackage (WString documentName)
 Once Package file is create, some additional Documents can be embedded in packaged file.This adds document in embeding List of package file. More...
 
PUBLISHLIB_EXPORT bvector
< WString > 
GetErrorList ()
 If either publish or package operation return ERROR then call this method to get the detail description about the error. More...
 
PUBLISHLIB_EXPORT void SetOverrideProvenanceSourceEvent (OverrideProvenanceSourceEvent fp)
 Sets the callback function for overriding the provenance source in the i-models. More...
 
PUBLISHLIB_EXPORT void SetOverrideProvenanceTargetEvent (OverrideProvenanceTargetEvent fp)
 Sets the callback function for overriding the provenance target in the i-models. More...
 
PUBLISHLIB_EXPORT void SetOnErrorCallbackEvent (OnErrorCallbackEvent fp)
 Sets the callback function for reporting errors during a publish or package operation. More...
 
PUBLISHLIB_EXPORT void SetAddProvenanceConfigMetaDataCallback (AddProvenanceConfigMetaDataCallback fp)
 Sets the callback function for adding configuration information in provenance for published and packaged files This will be helpful when user want to supply some additional provenance information, which is required to be ava in published and packaged files. More...
 
bool GetRemoveIModelsAfterPackaging () const
 Get remove i-model after packaging option. More...
 
void SetRemoveIModelsAfterPackaging (bool option)
 Set remove i-model after packaging option to remove intermediate files after creating package. More...
 
StatusInt SetLicenseType (LicenseType licenseType)
 Set license type option to grant possible access right(s). More...
 
LicenseType GetLicenseType () const
 Get license type option. More...
 
void SetCanExport (bool canExport)
 Set can export option to provide export capability to package i-model. More...
 
bool GetCanExport () const
 Get can export option. More...
 
void SetCanPrint (bool canPrint)
 Set can print option to provide printing capability to package i-model. More...
 
bool GetCanPrint () const
 Get can print option. More...
 
StatusInt SetPassword (WCharCP password)
 Set the password to be applied to the package i-model. More...
 
WCharCP GetPassword () const
 Get the password that will be applied to the package i-model. More...
 
StatusInt SetCertificate (WCharCP certificateName, WCharCP recipient)
 Set the certificate to be applied to the package i-model. More...
 
WCharCP GetCertificateID () const
 Get certificate file path. More...
 
WCharCP GetCertificateRecipient () const
 Get certificate recipient. More...
 
StatusInt SetExpiration (WCharCP expiration)
 Set expiration date. More...
 
WCharCP GetExpiration () const
 Get expiration. More...
 
StatusInt SetEmbedFonts (bool value)
 Set embed fonts option for the fonts to get embedded in a package i-model. More...
 
bool GetEmbedFonts () const
 Get the embed fonts option. More...
 
 PublishViewOptions ()
 
bool GetPublishActiveViewOnly () const
 Get publish active view only option. More...
 
WCharCP GetPublishSavedViewName () const
 Get saved view name to publish. More...
 
DgnModelRefP GetActiveDgnModelRefP () const
 Get the active model to which the saved view belongs. More...
 
int GetPublishViewNumber () const
 Get publish view number option. More...
 
ViewportP GetViewPort (int viewNumber) const
 Get publish view number option. More...
 
StatusInt SetPublishActiveView (int viewNumber, ViewportP viewPortToPublish)
 Set publish active view option. More...
 
StatusInt SetPublishSavedView (WCharCP savedViewName, DgnModelRefP activeDgnModelRefPToPublish)
 Set publish saved view option. More...
 
StatusInt SetPublishDesignLinks (bool value)
 Set publish design links option. More...
 
bool GetPublishDesignLinks () const
 Get publish design links option. More...
 
StatusInt SetRepublishAllFiles (bool value)
 Set republish all files option. More...
 
bool GetRepublishAllFiles () const
 Get republish all files option. More...
 
StatusInt SetPublishReferences (bool value)
 Set Publish References option. More...
 
bool GetPublishReferences () const
 Get Publish References option. More...
 
StatusInt SetCacheVisibleEdges (bool value)
 Set Cache Visible Edges option. More...
 
bool GetCacheVisibleEdges () const
 Get Cache Visible Edges option. More...
 
StatusInt SetRetainOutOfDateVECaches (bool value)
 Set Retain out of date Cache Visible Edges option. More...
 
bool GetRetainOutOfDateVECaches () const
 Get retain out of date Cache Visible Egdes option. More...
 
StatusInt SetPublishDisplayedAttachmentsOnly (bool value)
 Set publish displayed reference attachments only option. More...
 
bool GetPublishDisplayedAttachmentsOnly () const
 Get publish displayed attachments only option. More...
 
PublishViewOptionsR GetPublishViewOptionsR ()
 Gets a reference of the current PublishOptions. More...
 
 DgnDbOptions ()
 
void SetLanguageFileCulture (WCharCP inputFileCulture)
 
WStringCR GetLanguageFileCulture () const
 
void SetDgnV8Password (WCharCP password)
 
WStringCR GetDgnV8Password () const
 
void SetTempFolderPath (WCharCP password)
 
WStringCR GetTempFolderPath () const
 
void SetShowProgressBar (bool showProgressBar, void *hInstance=NULL)
 
bool GetShowProgressBar () const
 
void * GetParentWindowHandle () const
 
virtual PUBLISHLIB_EXPORT WCharCP _GetEngineName ()=0
 This method must be overridden, this method should return a valid engine name. More...
 
virtual PUBLISHLIB_EXPORT WCharCP _GetEngineVersion ()=0
 This method must be overridden, this method should return a valid engine version. More...
 
PUBLISHLIB_EXPORT WCharCP GetEngineName ()
 
PUBLISHLIB_EXPORT WCharCP GetEngineVersion ()
 
virtual PUBLISHLIB_EXPORT ~IIModelEngineInfoProvider ()
 
virtual PUBLISHLIB_EXPORT void _GetIconLibs (bvector< DgnFileP > &m_files)
 This method must be overridden, this method provides list of DgnLibs having Icon related to files. More...
 
PUBLISHLIB_EXPORT DgnIconLibsProvider ()
 
virtual PUBLISHLIB_EXPORT ~DgnIconLibsProvider ()
 
virtual PUBLISHLIB_EXPORT
DgnFileSupplyRightsP 
_GetDgnFileSupplyRights ()=0
 This method must be overridden, this method provides the credential to protected DGN file. More...
 
virtual ~IDgnFileSupplyRightProvider ()
 
virtual PUBLISHLIB_EXPORT
IIModelEngineInfoProviderR 
_GetEngineInfoProvider ()=0
 It is mandatory to provide IIModelEngineInfoProvider implementation. More...
 
virtual PUBLISHLIB_EXPORT
DgnIconLibsProviderR 
_GetIconLibProvider ()
 It is optional to provide DgnIconLibsProviderR implementation. More...
 
virtual PUBLISHLIB_EXPORT
IDgnFileSupplyRightProviderP 
_GetRightsProvider ()
 It is optional to provide IDgnFileSupplyRightProvider implementation. More...
 
PUBLISHLIB_EXPORT IIModelPublishingProvider ()
 
virtual PUBLISHLIB_EXPORT ~IIModelPublishingProvider ()
 
PUBLISHLIB_EXPORT
IIModelEngineInfoProviderR 
GetEngineInfoProvider ()
 IModelPublisher consumes this method internally. More...
 
PUBLISHLIB_EXPORT
DgnFileSupplyRightsP 
GetDgnFileSupplyRights ()
 IModelPublisher consumes this method internally. More...
 
PUBLISHLIB_EXPORT
DgnIconLibsProviderR 
GetIconLibProvider ()
 IModelPublisher consumes this method internally. More...
 

Detailed Description

The i-model publish library provides APIs to publish and package i-model.

Overview of common uses for i-model Publish library with the following capabilities:

i-model Primer

Introduction

What is an i-model?

When are i-models used?

Examples of when i-models are used include:

What are the benefits of an i-model?

The characteristics that make an i-model ideal for project information exchange:

What are the characteristics of an i.dgn?

When an i-model is persisted in a DGN container it inherits all of the characteristics described above. Some more detail on DGN i-models:

Developing i-model Applications

The MicroStation SDK supports the publishing and consumption of i-models from both MicroStation and non-MicroStation based applications. The scenarios supported are described in more detail below:

The Namespaces needed to be included:

Publishing i-models From a MicroStation Based Application

Reading business data from i-models using a MicroStation Based Application

Using the DgnPlatform SDK, perform the following tasks:

Publishing i-models From a Non-MicroStation Based Application

Using the SDK, the 3rd-party application plug-in would perform the following tasks:

Typedef Documentation

typedef StatusInt(* AddProvenanceConfigMetaDataCallback)(WString &)
typedef DgnDbOptions const& DgnDbOptionsCR
typedef DgnDbOptions& DgnDbOptionsR
typedef DgnIconLibsProvider* DgnIconLibsProviderP
typedef RefCounted<DgnIconLibsProvider> DgnIconLibsProviderPtr
typedef DgnIconLibsProvider& DgnIconLibsProviderR
typedef bvector<WString> EmbedDocumentList
typedef EmbedDocumentList& EmbedDocumentListR
typedef IDgnFileSupplyRightProvider* IDgnFileSupplyRightProviderP
typedef RefCounted<IDgnFileSupplyRightProvider> IDgnFileSupplyRightProviderPtr
typedef IDgnFileSupplyRightProvider& IDgnFileSupplyRightProviderR
typedef IIModelEngineInfoProvider* IIModelEngineInfoProviderP
typedef IIModelEngineInfoProvider& IIModelEngineInfoProviderR
typedef RefCounted<IIModelEngineInfoProvider> IIModelEngineInfoPtrProvider
typedef IIModelPublishingProvider* IIModelPublishingProviderP
typedef RefCounted<IIModelPublishingProvider> IIModelPublishingProviderPtr
typedef IIModelPublishingProvider& IIModelPublishingProviderR
typedef IModelPublisher const& IModelPublisherCR
typedef IModelPublisher* IModelPublisherP
typedef RefCountedPtr<IModelPublisher> IModelPublisherPtr
typedef IModelPublisher& IModelPublisherR
typedef void(* OnErrorCallbackEvent)(WCharCP)

A callback for reporting errors during a publish or package operation.

typedef StatusInt( * OverrideProvenanceSourceEvent)(WString &,WCharCP)

A callback for overriding provenance source.

typedef StatusInt( * OverrideProvenanceTargetEvent)(WString &,WCharCP)

A callback for overriding provenance target.

typedef PackageOptions const& PackageOptionsCR
typedef PackageOptions& PackageOptionsR
typedef StatusInt(* ProcessFileCallback)(DgnFileCR, DgnFilePtr &)

A callback for processing a file and substituting with another one.

typedef PublishOptions const& PublishOptionsCR
typedef PublishOptions& PublishOptionsR
typedef PublishViewOptions const& PublishViewOptionsCR
typedef PublishViewOptions& PublishViewOptionsR

Enumeration Type Documentation

enum IModelStatus

Different possible error types that can be used returned by DgnDb publishing.

Enumerator
IMODEL_Success 

DgnDb i-model successfully published.

IMODEL_ImporterNotFound 

The DgnDb Importer cannot be found.

IMODEL_ImporterNotSupported 

The DgnDb Importer is not supported on the current OS.

IMODEL_PackageFileNotFound 

The source package file specified does not exist.

IMODEL_MobileIModelFileExtension 

The filename specified for the i-model does not have the .imodel extension.

IMODEL_AccessViolation 

The file is read only or in use.

IMODEL_Error 

Unable to create DgnDb i-model. The destination filename should be accessible. Check logfile for more information if present.

enum LicenseType

Different possible License Types that can be used in PackageOptions.

Enumerator
LICENSE_Everyone 

An author grants access to a file to everyone by setting this license type in PackageOptions. Generally, it makes sense to create an Everyone license that only grants limited rights. For example, creating an everyone license that allows anyone to view the file.

LICENSE_Password 

An author grants access to a file by creating a password.

LICENSE_Certificate 

An author can select a digital certificate from their personal certificate store or identify a signed e-mail message file (.msg) or certificate file (.cer or .p7b).

LICENSE_None_ProtectionDisabled 

No Protection.

Function Documentation

virtual PUBLISHLIB_EXPORT DgnFileSupplyRightsP _GetDgnFileSupplyRights ( )
protectedpure virtual

This method must be overridden, this method provides the credential to protected DGN file.

Implemented in SupplyRightsProvider.

virtual PUBLISHLIB_EXPORT IIModelEngineInfoProviderR _GetEngineInfoProvider ( )
protectedpure virtual

It is mandatory to provide IIModelEngineInfoProvider implementation.

Returns
IIModelEngineInfoProvider implementation's reference.

Implemented in PublishingProvider.

virtual PUBLISHLIB_EXPORT WCharCP _GetEngineName ( )
protectedpure virtual

This method must be overridden, this method should return a valid engine name.

Implemented in EngineInfoProvider.

virtual PUBLISHLIB_EXPORT WCharCP _GetEngineVersion ( )
protectedpure virtual

This method must be overridden, this method should return a valid engine version.

Implemented in EngineInfoProvider.

virtual PUBLISHLIB_EXPORT DgnIconLibsProviderR _GetIconLibProvider ( )
protectedvirtual

It is optional to provide DgnIconLibsProviderR implementation.

Returns
DgnIconLibsProvider implementation's reference.

Reimplemented in PublishingProvider.

virtual PUBLISHLIB_EXPORT void _GetIconLibs ( bvector< DgnFileP > &  m_files)
protectedvirtual

This method must be overridden, this method provides list of DgnLibs having Icon related to files.

Reimplemented in IconLibsProvider.

virtual PUBLISHLIB_EXPORT IDgnFileSupplyRightProviderP _GetRightsProvider ( )
protectedvirtual

It is optional to provide IDgnFileSupplyRightProvider implementation.

Returns
DgnIconLibsProvider implementation's reference.

Reimplemented in PublishingProvider.

static PUBLISHLIB_EXPORT IModelPublisherPtr Create ( DgnDocumentCR  dgnDocument,
IIModelPublishingProviderR  providerInstance 
)
static

Creates an instance of IModelPublisher that you can use to publish and package an i-model.

Parameters
[in]dgnDocumentDgnDocument of file that is required to be published
[in]providerInstanceThe IModelPublishingProvider instance that contains information about the application which is hosting the publishing engine.
Returns
A pointer to a newly created IModelPublisher instance.
DgnDbOptions ( )
PUBLISHLIB_EXPORT DgnIconLibsProvider ( )
protected
PUBLISHLIB_EXPORT StatusInt EmbedDocumentInPackage ( WString  documentName)

Once Package file is create, some additional Documents can be embedded in packaged file.This adds document in embeding List of package file.

Parameters
[in]documentNameDocument Name
PUBLISHLIB_EXPORT StatusInt EmbedDocumentsInPackage ( EmbedDocumentListR  documentList)

Once Package file is create, some additional Documents can be embedded in packaged file.

Parameters
[in]documentListList of Documents;
DgnModelRefP GetActiveDgnModelRefP ( ) const

Get the active model to which the saved view belongs.

Returns
MSWCharCP Expiration
bool GetCacheVisibleEdges ( ) const

Get Cache Visible Edges option.

Returns
bool true or false
bool GetCanExport ( ) const

Get can export option.

Returns
bool true if export option is turned ON or false.
bool GetCanPrint ( ) const

Get can print option.

Returns
bool true or false.
WCharCP GetCertificateID ( ) const

Get certificate file path.

Returns
WCharCP ID
WCharCP GetCertificateRecipient ( ) const

Get certificate recipient.

The email id of the recipient.

Returns
WCharCP Recipient Name of the entity the certificate is issued to. Open the Certificate file and see the 'Issued to:' field in the General tab.
PUBLISHLIB_EXPORT DgnDbOptionsR GetDgnDbOptionsR ( )

Gets a reference of the current DgnDbOptions.

You can use this reference to get/set the DgnDb options

Returns
A reference to a DgnDbOptions instance.
PUBLISHLIB_EXPORT DgnFileSupplyRightsP GetDgnFileSupplyRights ( )

IModelPublisher consumes this method internally.

WStringCR GetDgnV8Password ( ) const
bool GetEmbedFonts ( ) const

Get the embed fonts option.

Returns
bool true or false.
PUBLISHLIB_EXPORT IIModelEngineInfoProviderR GetEngineInfoProvider ( )

IModelPublisher consumes this method internally.

PUBLISHLIB_EXPORT WCharCP GetEngineName ( )
PUBLISHLIB_EXPORT WCharCP GetEngineVersion ( )
PUBLISHLIB_EXPORT bvector<WString> GetErrorList ( )

If either publish or package operation return ERROR then call this method to get the detail description about the error.

Returns
A list of message(s) containing detailed description about the error .
WCharCP GetExpiration ( ) const

Get expiration.

Returns
WCharCP Expiration
PUBLISHLIB_EXPORT DgnIconLibsProviderR GetIconLibProvider ( )

IModelPublisher consumes this method internally.

WStringCR GetLanguageFileCulture ( ) const
LicenseType GetLicenseType ( ) const

Get license type option.

Returns
LicenseType
See also
LicenseType for possible values.
PUBLISHLIB_EXPORT PackageOptionsR GetPackageOptionsR ( )

Gets a reference of the current PackageOptions.

You can use this reference to get/set the package options

Returns
A reference to a PackageOptions instance.
void* GetParentWindowHandle ( ) const
WCharCP GetPassword ( ) const

Get the password that will be applied to the package i-model.

Returns
WCharCP password
bool GetPublishActiveViewOnly ( ) const

Get publish active view only option.

Returns
bool true or false
bool GetPublishDesignLinks ( ) const

Get publish design links option.

Returns
bool true or false
bool GetPublishDisplayedAttachmentsOnly ( ) const

Get publish displayed attachments only option.

Returns
bool true or false
PUBLISHLIB_EXPORT PublishOptionsR GetPublishOptionsR ( )

Gets a reference of the current PublishOptions.

You can use this reference to get/set the publish options

Returns
A reference to a PublishOptions instance.
bool GetPublishReferences ( ) const

Get Publish References option.

Returns
bool true or false
WCharCP GetPublishSavedViewName ( ) const

Get saved view name to publish.

Returns
MSWCharCP Expiration
int GetPublishViewNumber ( ) const

Get publish view number option.

Returns
int view number
PublishViewOptionsR GetPublishViewOptionsR ( )

Gets a reference of the current PublishOptions.

You can use this reference to get/set the publish options

Returns
A reference to a PublishOptions instance.
bool GetRemoveIModelsAfterPackaging ( ) const

Get remove i-model after packaging option.

Returns
bool true or false.
bool GetRepublishAllFiles ( ) const

Get republish all files option.

Returns
bool true or false
bool GetRetainOutOfDateVECaches ( ) const

Get retain out of date Cache Visible Egdes option.

Returns
bool true or false
bool GetShowProgressBar ( ) const
WStringCR GetTempFolderPath ( ) const
ViewportP GetViewPort ( int  viewNumber) const

Get publish view number option.

Returns
int view number
PUBLISHLIB_EXPORT IIModelPublishingProvider ( )
PUBLISHLIB_EXPORT StatusInt Publish ( )

Publishes the file which was specified in IModelPublisher::Create method of IModelPublisher.

It also publishes all the attached references of the design file. Before calling this methods, user should set various publishing options. Available publishing options are PublishDesignLinks, RepublishAllFiles, PublishReferences, CacheVisibleEdges and RetainOutOfDateVECaches.

See also
PublishOptions for all possible publishing options.
Returns
SUCCESS if operation was successful otherwise ERROR on failure.
PUBLISHLIB_EXPORT StatusInt PublishAndPackage ( DgnDocumentR  packageDocument)

First publishes and then packages all the published i-models created for the master design file (and all its attached references).

You can specify DgnDocument object of the master design file while creating the instance of IModelPublisher using Create method. Before calling this methods, user should set various publishing and packaging options. Available publishing options are PublishDesignLinks, RepublishAllFiles, PublishReferences, CacheVisibleEdges and RetainOutOfDateVECaches. And available packaging options are RemoveIModelsAfterPackaging, LicenseType, CanExport, CanPrint, Password, Certificate and Expiration,

See also
PublishOptions for all possible publishing options
PackageOptions for all possible packaging options
Parameters
[in]packageDocumentThe DgnDocument object of the packaged i-model.
Returns
SUCCESS if publish and package operation is successful otherwise ERROR on failure.
PUBLISHLIB_EXPORT IModelStatus PublishDgnDbIModel ( WStringCR  packageFileName,
DgnDocumentR  dotIModelDocument 
)

Converts a V8i i-model with .i.dgn extension to the DgnDb i-model (.imodel) format.

Requires the DgnDbImporter to be installed in order to work.

Parameters
packageFileNameWString - the full path of the existing Package file that will be converted to a DgnDb i-model (.imodel)
drmPasswordWString - if the Package file is password protected then the password should be provided otherwise nullptr should be given
dotIModelDocumentDgnDocumentR - the DgnDocument to use for creating the DgnDb i-model.
Returns
status of the PublishDgnDb operation as IModelStatus. IMODEL_Success if operations were successful or other IModelStatus code if they failed. Please use the following snippet to create your instance of DgnDocument:
DgnDocument::OverwriteMode overwrite = DgnPlatform::DgnDocument::OverwriteMode::Always;
DgnDocumentPtr dotIModelDocument = DgnDocument::CreateForNewFile(fileStatus, L"c:\\destination_filename.imodel", L"MS_DEF", DEFPUBLISHDGNFILE_ID, L".imodel", overwrite, DgnDocument::CreateOptions::Default);
IModelPublisher::PublishDgnDbIModel(L"C:\\data\\mycurrentpackage.i.dgn", *dotIModelDocument);

DEFPUBLISHDGNFILE_ID should be used as fourth argument of DgnDocument::CreateForNewFile() method to create a proper i-model.
L".imodel" should be used as fifth argument of CreateForNewFile() method to create a proper i-model

PublishViewOptions ( )
PUBLISHLIB_EXPORT void SetAddProvenanceConfigMetaDataCallback ( AddProvenanceConfigMetaDataCallback  fp)

Sets the callback function for adding configuration information in provenance for published and packaged files This will be helpful when user want to supply some additional provenance information, which is required to be ava in published and packaged files.

Parameters
fpAddProvenanceConfigMetaDataCallback function pointer. Only one callback can be registered to add configuration information.
// user callback method to add configuration information in provenance
{
outString = L"UserDefined configuration information";
}
// in your code
using namespace Bentley::DgnIModel;
IModelPublisherPtr imodelPublisher = IModelPublisher::Create (masterDgnFile, imodelPublishingProviderInstance);
imodelPublisher->SetAddProvenanceConfigMetaDataCallback ( AddProvenanceConfigMetaDataCallback );
StatusInt SetCacheVisibleEdges ( bool  value)

Set Cache Visible Edges option.

Parameters
[in]valuetrue to cache visible edges for 3D attachments
Returns
Status of the operation (SUCCESS/ERROR)
void SetCanExport ( bool  canExport)

Set can export option to provide export capability to package i-model.

Parameters
[in]canExporttrue to provide export capability or else false.
void SetCanPrint ( bool  canPrint)

Set can print option to provide printing capability to package i-model.

Parameters
[in]canPrinttrue to provide printing capability or else false.
StatusInt SetCertificate ( WCharCP  certificateName,
WCharCP  recipient 
)

Set the certificate to be applied to the package i-model.

With this option, the certificate would be required to open the package file.

Parameters
[in]certificateNameCertificate file path. Extension of possible certificate files are .cer, .p7b and .msg
[in]recipientName of the entity the certificate is issued to. Open the Certificate file and see the 'Issued to:' field in the General tab.
Returns
status of the operation, SUCCESS or ERROR.
void SetDgnV8Password ( WCharCP  password)
StatusInt SetEmbedFonts ( bool  value)

Set embed fonts option for the fonts to get embedded in a package i-model.

Returns
status of the operation, SUCCESS or ERROR.
StatusInt SetExpiration ( WCharCP  expiration)

Set expiration date.

Date format YYYY/MM/DD. For year:2000, month:Jan and Day:24, use "2000/01/24".

Parameters
[in]expiration
Returns
status of the operation, SUCCESS or ERROR.
void SetLanguageFileCulture ( WCharCP  inputFileCulture)
StatusInt SetLicenseType ( LicenseType  licenseType)

Set license type option to grant possible access right(s).

Parameters
[in]licenseType
See also
LicenseType for possible values.
Returns
status of the operation, SUCCESS or ERROR.
PUBLISHLIB_EXPORT void SetOnErrorCallbackEvent ( OnErrorCallbackEvent  fp)

Sets the callback function for reporting errors during a publish or package operation.

Returns
None
PUBLISHLIB_EXPORT void SetOverrideProvenanceSourceEvent ( OverrideProvenanceSourceEvent  fp)

Sets the callback function for overriding the provenance source in the i-models.

This will be helpful when user want to create a temporary DGN file to add xmlInstanses and publish the temporary DGN file to an i-model. By default, temporary DGN file name will be captured in a provenance record which may not be desired source file. So with this callback user will get a chance to override the default name to some meaningful source file name. No validation will be done on the name provided and will be used as it is in provenance record.

Parameters
fpOverrideProvenanceSourceEvent function pointer. Only one callback can be registered to override the default source name.
// user callback method to override provenance source
void OverrideProvenanceSourceEventCallback ( Bentley::WString& outString, WCharCP inString)
{
// value provided in outString will override the value in inString.
// no validation will be done on the path provided in the outString and will be used as it is as source path in the provenance
outString = L"file://C:\\DesignHistory.dgn";
}
// in your code
using namespace Bentley::DgnIModel;
IModelPublisherPtr imodelPublisher = IModelPublisher::Create (masterDgnFile, imodelPublishingProviderInstance);
imodelPublisher->SetOverrideProvenanceSourceEvent ( OverrideProvenanceSourceEventCallback );
PUBLISHLIB_EXPORT void SetOverrideProvenanceTargetEvent ( OverrideProvenanceTargetEvent  fp)

Sets the callback function for overriding the provenance target in the i-models.

Parameters
fpOverrideProvenanceTargetEvent function pointer. Only one callback can be registered to override the default provenance target name.
// user callback method to override provenance target
void OverrideProvenanceTargetEventCallback ( Bentley::WString& outString, WCharCP inString)
{
outString = L"UserDefinedName";
}
// in your code
using namespace Bentley::DgnIModel;
IModelPublisherPtr imodelPublisher = IModelPublisher::Create (masterDgnFile, imodelPublishingProviderInstance);
imodelPublisher->SetOverrideProvenanceTargetEvent ( OverrideProvenanceSourceEventCallback );
StatusInt SetPassword ( WCharCP  password)

Set the password to be applied to the package i-model.

With this option, the password would be required to open the package file.

Parameters
[in]passwordSet the password.
Returns
status of the operation, SUCCESS or ERROR.
StatusInt SetPublishActiveView ( int  viewNumber,
ViewportP  viewPortToPublish 
)

Set publish active view option.

Parameters
[in]value1 - 8 of the view number to publish.
[in]Viewportsare usually mapped to one of the 8 numbered MicroStation views (i.e., View 1, View 2, etc.).
Returns
Status of the operation (SUCCESS/ERROR)
StatusInt SetPublishDesignLinks ( bool  value)

Set publish design links option.

Parameters
[in]valuetrue to publish design links else false
Returns
Status of the operation (SUCCESS/ERROR)
StatusInt SetPublishDisplayedAttachmentsOnly ( bool  value)

Set publish displayed reference attachments only option.

Parameters
[in]valuetrue to publish displayed reference attachments only
Returns
Status of the operation (SUCCESS/ERROR)
StatusInt SetPublishReferences ( bool  value)

Set Publish References option.

Parameters
[in]valuetrue to publish references else false to publish only the master file
Returns
Status of the operation (SUCCESS/ERROR)
StatusInt SetPublishSavedView ( WCharCP  savedViewName,
DgnModelRefP  activeDgnModelRefPToPublish 
)

Set publish saved view option.

Parameters
[in]Nameof the publishable saved view.
[in]ActiveDgnModelRef to which the saved view belongs.
Returns
Status of the operation (SUCCESS/ERROR)
void SetRemoveIModelsAfterPackaging ( bool  option)

Set remove i-model after packaging option to remove intermediate files after creating package.

Parameters
[in]optiontrue to remove i-model after packaging or else false.
StatusInt SetRepublishAllFiles ( bool  value)

Set republish all files option.

Parameters
[in]valuetrue to republish all files else false to publish only unpublished files
Returns
Status of the operation (SUCCESS/ERROR)
StatusInt SetRetainOutOfDateVECaches ( bool  value)

Set Retain out of date Cache Visible Edges option.

Parameters
[in]valuetrue to retain out of date cache visible edges for 3D attachments
Returns
Status of the operation (SUCCESS/ERROR)
void SetShowProgressBar ( bool  showProgressBar,
void *  hInstance = NULL 
)
void SetTempFolderPath ( WCharCP  password)
virtual PUBLISHLIB_EXPORT ~DgnIconLibsProvider ( )
protectedvirtual
virtual ~IDgnFileSupplyRightProvider ( )
virtual
virtual PUBLISHLIB_EXPORT ~IIModelEngineInfoProvider ( )
virtual
virtual PUBLISHLIB_EXPORT ~IIModelPublishingProvider ( )
virtual

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.