IAcSmDatabase


The main SheetSet Database interface.

available methods :

(setq cad (vlax-get-acad-object))
(setq ssmgr (vla-GetInterfaceObject  cad  "BricscadSm.AcSmSheetSetMgr"))
(setq smdb (vlax-invoke-method ssmgr 'OpenDatabase dstfile))

LoadFromFile

(re-)loads from the specified DST template database, or re-initialise from assigned DST database file if no template is specified (as "0")

(setq smdb (vlax-invoke-method ssmgr 'CreateDatabase ""))
(setq res (vlax-invoke-method smdb 'LoadFromFile dstfile))

HRESULT LoadFromFile ([in, optional, defaultvalue("0")] BSTR templateDstFile)

GetFileName

returns the DST file that this database is associated with

(setq name (vlax-invoke-method smdb 'GetFileName))

HRESULT GetFileName ([out, retval] BSTR* pFilename)

SetFileName

assigns the DST file that this database is associated with (only once; after a new IAcSmDatabase was constructed)

(setq smdb (vlax-invoke-method ssmgr 'CreateDatabase ""))
(vlax-invoke-method smdb 'SetFileName dstFile)

HRESULT SetFileName ([in] BSTR filename)

GetTemplateDstFileName

returns the template DST file that was used with 'LoadFromFile'

(setq name (vlax-invoke-method smdb 'GetTemplateDstFileName))

HRESULT GetTemplateDstFileName ([out, retval] BSTR* pFilename)

GetSheetSet

returns the IAcSmSheetSet component managed by this IAcSmDatabase

(setq sheetset (vlax-invoke-method smdb 'GetSheetSet))

HRESULT GetSheetSet ([out, retval] IAcSmSheetSet** pSheetSet)

LockDb

locks this IAcSmDatabase to allow modifications of the specified object

(setq res (vlax-invoke-method smdb 'LockDb smdb))  ;; locks the entire database

HRESULT LockDb ([in] IUnknown* pObject)

UnlockDb

unlocks this IAcSmDatabase (after all modifications are done), optionally (default) commits to the disk file

(setq res (vlax-invoke-method smdb 'UnlockDb smdb :vlax-false))  ;; unlocks the entire database, not committed to disk
(setq res (vlax-invoke-method smdb 'UnlockDb smdb :vlax-false))  ;; unlocks the entire database, committed to disk

HRESULT UnlockDb ([in] IUnknown* pObject, [in, optional, defaultvalue(-1)] VARIANT_BOOL bCommit)

GetLockStatus

returns the locking status for this IAcSmDatabase

(setq res (vlax-invoke-method smdb 'GetLockStatus))

HRESULT GetLockStatus ([out, retval] AcSmLockStatus* pStatus)

GetLockOwnerInfo

returns informations on the owner of the current lock

(setq res (vlax-invoke-method smdb 'GetLockOwnerInfo 'lockUser 'lockMachine))

HRESULT GetLockOwnerInfo ([out] BSTR* pUserName, [out] BSTR* pMachineName)

GetNewObjectId

returns the IAcSmObjectId (or creates it, if necessary) for the specified object handle

(setq id (vlax-invoke-method smdb GetNewObjectId handle 'cookie))

HRESULT GetNewObjectId ([in] BSTR hand, [out] long* pCookie, [out, retval] IAcSmObjectId** ppObjectId)

RegisterOwner

defines the owner for the provided IAcSmPersist object to create object hierarchies

(vlax-invoke-method smdb RegisterOwner cookie object ownerObject)

HRESULT RegisterOwner ([in] long cookie, [in] IAcSmPersist* pObject, [in] IAcSmPersist* pOwner)

GetEnumerator

returns an enumerator (iterator) object for this IAcSmDatabase (iterating all contained objects)

(setq iter (vlax-invoke-method smdb 'GetEnumerator))

HRESULT GetEnumerator ([out, retval] IAcSmEnumPersist** ppEnumerator)

FindObject

returns the IAcSmPersist object for the specified persistent object handle

(setq handle (vlax-invoke-method sheetset 'GetObjectId))
(setq handle (vlax-invoke-method handle 'GetHandle))
(setq obj (vlax-invoke-method smdb 'FindObject handle))

HRESULT FindObject ([in] BSTR hand, [out, retval] IAcSmPersist** ppObject)

FindAcDbObjectReferences

returns an array of IAcSmAcDbObjectReference objects that reference the specified AcDbObject database object

(setq blocks (vla-get-Blocks (vla-get-activedocument cad)))
(setq block (vla-item blocks "test"))
(setq res (vlax-invoke-method smdb 'FindAcDbObjectReferences block))

HRESULT FindAcDbObjectReferences ([in] IAcadObject* pAcDbObject, [out, retval] SAFEARRAY(IUnknown*)* ppObjects)

UpdateInMemoryDwgHints

updates the hints in all open drawings referenced by this IAcSmDatabase

(setq res (vlax-invoke-method smdb 'UpdateInMemoryDwgHints))

HRESULT UpdateInMemoryDwgHints ()

GetIsTemporary

returns whether this IAcSmDatabase is persistent or not

(setq res (vlax-invoke-method smdb 'GetIsTemporary))

HRESULT GetIsTemporary ([out, retval] VARIANT_BOOL* isTemporary)

SetIsTemporary

defines this IAcSmDatabase as not being persistent

(setq res (vlax-invoke-method smdb 'SetIsTemporary))

HRESULT SetIsTemporary ()

GetDbVersion

returns the IAcSmDatabase version

(setq res (vlax-invoke-method smdb 'GetDbVersion))

HRESULT GetDbVersion ([out, retval] BSTR* pVersionString)


©  Bricsys NV. All rights reserved.