Table of Contents

Class Core

Namespace
Core

Methods

cloneEntity

Clone an entity

core.cloneEntity(entity) -> core.Entity

Parameters

entity Entity

The entity to clone

Returns

Entity

The cloned entity

configureFunctionLogger

core.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)

Parameters

functionName String
enableFunction Boolean
enableParameters Boolean
enableExecutionTime Boolean

createEntity

Create an entity

core.createEntity(type) -> core.Entity

Parameters

type EntityType

The type of entity to create

Returns

Entity

The created entity id

deleteEntities

Delete a set of entities

core.deleteEntities(entities)

Parameters

entities EntityList

List of entity to delete

resetSession

Clear all the current session (all unsaved work will be lost)

core.resetSession()

unsavedUserChanges

Returns true if the user has made changes to the project

core.unsavedUserChanges() -> core.Bool

Returns

Bool

Boolean checking if the project has been modified

getEvent

core.getEvent(moduleName, eventName) -> core.EventDesc

Parameters

moduleName String

Target module name

eventName String

Returns

EventDesc

getEvents

core.getEvents(moduleName, groupName) -> core.EventDescList

Parameters

moduleName String

Target module name

groupName String

Target group name

Returns

EventDescList

getFunction

core.getFunction(moduleName, functionName) -> core.FunctionDesc

Parameters

moduleName String

Target module name

functionName String

Target function name

Returns

FunctionDesc

getFunctions

core.getFunctions(moduleName, groupName) -> core.FunctionDescList

Parameters

moduleName String

Target module name

groupName String

Target group name

Returns

FunctionDescList

getGroup

core.getGroup(moduleName, groupName) -> core.GroupDesc

Parameters

moduleName String

Target module name

groupName String

Target group name

Returns

GroupDesc

getGroups

core.getGroups(moduleName) -> core.GroupDescList

Parameters

moduleName String

Target module name

Returns

GroupDescList

getModuleTypes

core.getModuleTypes(moduleName) -> core.TypeDescList

Parameters

moduleName String

Target module name

Returns

TypeDescList

getModules

core.getModules() -> core.ModuleDescList

Returns

ModuleDescList

getModulesName

core.getModulesName() -> core.StringList

Returns

StringList

getType

core.getType(moduleName, typeNameStr) -> core.TypeDesc

Parameters

moduleName String

Target module name

typeNameStr String

Target type name

Returns

TypeDesc

getTypeAttributes

core.getTypeAttributes(moduleName, typeNameStr) -> core.StringPairList

Parameters

moduleName String

Target module name

typeNameStr String

Target type name

Returns

StringPairList

softStopAsyncEventManager

core.softStopAsyncEventManager()

lockProcessing

Lock the mutex that ensure no processing is done between lock/unlock

See also:

core.lockProcessing()

tryLockProcessing

Try to lock the mutex that ensure no processing is done between lock/unlock, returns true if the mutex has been locked, false if it was already locked

See also:

core.tryLockProcessing() -> core.Bool

Returns

Bool

True if the mutex has been successfully locked

unlockProcessing

Unlock the mutex that ensure no processing is done between lock/unlock

See also:

core.unlockProcessing()

askString

core.askString(msg, defaultValue) -> core.String

Parameters

msg String

Message to display

defaultValue String

Message to display

Returns

String

The string entered by the user

askYesNo

Ask a question which need a Yes/No answer

See also:

core.askYesNo(question, defaultValue) -> core.Boolean

Parameters

question String

Question to display

defaultValue Boolean

Default value (if interfactive mode is disabled)

Returns

Boolean

True if the user say Yes, else False

choose

Invite the user to choose one value between multiple choice

See also:

core.choose(message, values, defaultValue) -> core.Int

Parameters

message String

Message to display

values StringList

Possible values to choose

defaultValue Int

Default value index

Returns

Int

Index of the chosen value in the values list

isInteractiveMode

Returns True if the script is in interactive mode, else returns false

See also:

core.isInteractiveMode() -> core.Boolean

Returns

Boolean

True if interactive, else false

message

Display a message (or a MessageBox in GUI)

See also:

core.message(msg)

Parameters

msg String

Message to display

setInteractiveMode

Switch between interactive mode and non-interactive mode, UI functions will no ask user on non-interactive mode and will return default values

See also:

core.setInteractiveMode(interactive=True)

Parameters

interactive Boolean

True if you want to enter interactive mode, else False

entityExists

core.entityExists(entity) -> core.Boolean

Parameters

entity Entity

The wanted entity

Returns

Boolean

True if it exists.

getAllEntities

core.getAllEntities() -> core.EntityList

Returns

EntityList

All entities

getCurrentPiXYZFile

core.getCurrentPiXYZFile() -> core.FilePath

Returns

FilePath

The current Pixyz file

getEntityType

core.getEntityType(entity) -> core.EntityType

Parameters

entity Entity

The wanted entity

Returns

EntityType

Type type of the entity

getEntityTypeString

core.getEntityTypeString(entity) -> core.String

Parameters

entity Entity

The wanted entity

Returns

String

Name of the entity type

getTypeStats

core.getTypeStats() -> core.IntListList

Returns

IntListList

isCurrentPiXYZFileModified

core.isCurrentPiXYZFileModified() -> core.Boolean

Returns

Boolean

True if the file is modified

load

core.load(fileName)

Parameters

fileName FilePath

Path to load the file

lockEntityRegistration

Lock Entity registration, use with Caution. All entities created after this call will not be saved on .pxz file and will not be listed as existing entities on the Database. Be careful to not references these entities with other registered entities

See also:

core.lockEntityRegistration()

save

core.save(fileName)

Parameters

fileName OutputFilePath

Path to save the file

unlockEntityRegistration

core.unlockEntityRegistration()

addWantedToken

core.addWantedToken(tokenName)

Parameters

tokenName String

Wanted token

checkLicense

core.checkLicense() -> core.Boolean

Returns

Boolean

checkWebLogin

core.checkWebLogin(login, password) -> core.Boolean

Parameters

login String

WEB account login

password Password

WEB account password

Returns

Boolean

configureLicenseServer

core.configureLicenseServer(address, port, flexLM=True)

Parameters

address String

Server address

port UShort

Server port

flexLM Boolean

Enable FlexLM license server

generateActivationCode

core.generateActivationCode(filePath)

Parameters

filePath OutputFilePath

Path to write the activation code

generateDeactivationCode

core.generateDeactivationCode(filePath)

Parameters

filePath OutputFilePath

Path to write the deactivation code

getCurrentLicenseInfos

core.getCurrentLicenseInfos() -> core.LicenseInfos

Returns

LicenseInfos

getLicenseServer

core.getLicenseServer() -> core.String, core.UShort, core.Bool

Returns

String

Server host name or IP

installLicense

core.installLicense(licensePath)

Parameters

licensePath FilePath

Path of the license file

listOwnedTokens

core.listOwnedTokens() -> core.StringList

Returns

StringList

Owned token list

listTokens

core.listTokens(onlyMandatory) -> core.StringList

Parameters

onlyMandatory Bool

If True, optional tokens will not be returned

Returns

StringList

Token list

listWantedTokens

core.listWantedTokens() -> core.StringList

Returns

StringList

Token list

needToken

core.needToken(tokenName)

Parameters

tokenName String

Token name

ownToken

core.ownToken(tokenName) -> core.Boolean

Parameters

tokenName String

Token name

Returns

Boolean

True if the token is owned

releaseToken

core.releaseToken(tokenName)

Parameters

tokenName String

Token name

releaseWebLicense

core.releaseWebLicense(login, password, id)

Parameters

login String

WEB account login

password Password

WEB account password

id Ident

WEB license id

removeWantedToken

core.removeWantedToken(tokenName)

Parameters

tokenName String

Unwanted token

requestWebLicense

core.requestWebLicense(login, password, id)

Parameters

login String

WEB account login

password Password

WEB account password

id Ident

WEB license id

retrieveWebLicenses

core.retrieveWebLicenses(login, password) -> core.WebLicenseInfoList

Parameters

login String

WEB account login

password Password

WEB account password

Returns

WebLicenseInfoList

tokenValid

core.tokenValid(tokenName) -> core.Bool

Parameters

tokenName String

Token name

Returns

Bool

parallelAddJob

Add a job to a parallel session

See also:

core.parallelAddJob(session, jobCallback, data)

Parameters

session ParallelSession
jobCallback ParallelCallback
data Ptr

parallelFinish

Ends a parallel session after waiting for all jobs to finish

See also:

core.parallelFinish(session)

Parameters

session ParallelSession

parallelStart

Starts a new parallel session

See also:

core.parallelStart(progression, name, jobCount) -> core.ParallelSession

Parameters

progression Boolean

Enable progression for the parallel session

name String

Name of the parallel session

jobCount Int

Count of parallel jobs if known (for progression)

Returns

ParallelSession

getOutputFilePath

Return a complete output file path for Pixyz Pipeline, this function is useful for online usage when you know where is the output directory

core.getOutputFilePath(fileName, data) -> core.OutputFilePath

Parameters

fileName String

The desired file name (suffix of the path)

data String

Optional data associated with file

Returns

OutputFilePath

The complete generated file path

getModuleDescFromXML

Generate a ModuleDesc from an .xml description

See also:

core.getModuleDescFromXML(xmlPath, addToModules) -> core.ModuleDesc

Parameters

xmlPath FilePath

.xml file path

addToModules Boolean

Returns

ModuleDesc

removeModule

Remove a module added via getModuleDescFromXML

See also:

core.removeModule(module)

Parameters

module String

Module name

popProgression

Leave current progression level

See also:

core.popProgression()

pushProgression

Create a new progression level

See also:

core.pushProgression(stepCount, progressName="")

Parameters

stepCount Int

Step count

progressName String

Name of the progression step

stepProgression

Add a step to current progression level

See also:

core.stepProgression(stepCount=1)

Parameters

stepCount Int

Step count

addCustomProperty

core.addCustomProperty(entity, name, value="", type=0)

Parameters

entity Entity

An entity that support custom properties

name String

Name of the custom property

value String

Value of the custom property

type PropertyType

Type of the custom property

getModuleProperty

core.getModuleProperty(module, propertyName) -> core.String

Parameters

module String

Name of the module

propertyName String

The property name

Returns

String

The property value

getModulePropertyInfo

core.getModulePropertyInfo(module, propertyName) -> core.PropertyInfo

Parameters

module String

Name of the module

propertyName String

The property name

Returns

PropertyInfo

The property info

getProperties

core.getProperties(entities, propertyName, defaultValue) -> core.StringList

Parameters

entities EntityList

List of entities

propertyName String

The property name

defaultValue String

Default value to return if the property does not exist on an entity

Returns

StringList

Property value on each entity

getProperty

core.getProperty(entity, propertyName) -> core.String

Parameters

entity Entity

The entity

propertyName String

The property name

Returns

String

The property value as String

getPropertyInfo

core.getPropertyInfo(entity, propertyName) -> core.PropertyInfo

Parameters

entity Entity

The entity

propertyName String

The property name

Returns

PropertyInfo

The property info

hasCustomProperty

core.hasCustomProperty(entityId, customPropertyName) -> core.Boolean

Parameters

entityId Entity

An entity that support properties

customPropertyName String

Name of the custom property

Returns

Boolean

True if the enity has the custom propery, else False

hasProperty

core.hasProperty(entity, propertyName) -> core.Boolean

Parameters

entity Entity

An entity that support properties

propertyName String

Name of the property

Returns

Boolean

True if the entity has the property asked, else False

listEnumLabels

core.listEnumLabels(enumType) -> core.EnumPropertyInfo

Parameters

enumType Int

The real enum type number (ie. The one return in subtype of PropertyInfo)

Returns

EnumPropertyInfo

The enum property info

listModuleProperties

core.listModuleProperties(module) -> core.PropertyInfoList

Parameters

module String

Name of the module

Returns

PropertyInfoList

List of module properties info

listProperties

core.listProperties(entity) -> core.PropertyInfoList

Parameters

entity Entity

Entity to list

Returns

PropertyInfoList

List of available properties info

listPropertiesBatch

core.listPropertiesBatch(entities) -> core.PropertyInfoListList

Parameters

entities EntityList

Entities to list

Returns

PropertyInfoListList

List of available properties info

removeCustomProperty

core.removeCustomProperty(entity, name)

Parameters

entity Entity

An entity that support custom properties

name String

Name of the custom property

restoreModulePropertyDefaultValue

core.restoreModulePropertyDefaultValue(module, propertyName) -> core.String

Parameters

module String

Name of the module

propertyName String

The property name

Returns

String

The property value as String

setModuleProperty

core.setModuleProperty(module, propertyName, propertyValue) -> core.String

Parameters

module String

Name of the module

propertyName String

The property name

propertyValue String

The property value

Returns

String

The property value as String

setProperty

core.setProperty(entity, propertyName, propertyValue) -> core.String

Parameters

entity Entity

The entity

propertyName String

The property name

propertyValue String

The property value

Returns

String

The property value as String

supportCustomProperties

core.supportCustomProperties(entity) -> core.Boolean

Parameters

entity Entity

An entity

Returns

Boolean

True if the entity support custom properties, else False

unsetProperty

core.unsetProperty(entity, propertyName)

Parameters

entity Entity

The entity

propertyName String

The property name

availableMemory

core.availableMemory() -> core.Long, core.Long, core.Long, core.Long

Returns

Long

Available virtual memory in bytes

checkForUpdates

core.checkForUpdates() -> core.Bool, core.String, core.String

Returns

Bool

True if there is a new version available of this product

clearOtherTemporaryDirectories

core.clearOtherTemporaryDirectories()

getCustomVersionTag

core.getCustomVersionTag() -> core.String

Returns

String

getMemoryUsagePeak

core.getMemoryUsagePeak() -> core.Long

Returns

Long

Maximum physical memory used by the process until now (in MB)

getPixyzWebsiteURL

core.getPixyzWebsiteURL() -> core.String

Returns

String

getProductName

core.getProductName() -> core.String

Returns

String

getTempDirectory

core.getTempDirectory() -> core.String

Returns

String

getVersion

core.getVersion() -> core.String

Returns

String

pushAnalytic

core.pushAnalytic(name, data="")

Parameters

name String

Analytic event name

data String

Analytic event data

removeDirectory

core.removeDirectory(path)

Parameters

path DirectoryPath

Path to the directory to remove

setCurrentThreadAsProcessThread

Set the process thread. Use this function when you want to get progress changed callbacks from another thread as the one you initialized Pixyz on.

See also:

core.setCurrentThreadAsProcessThread()

clearUndoRedo

core.clearUndoRedo()

endUndoRedoStep

core.endUndoRedoStep()

getRedoStack

core.getRedoStack() -> core.StringList

Returns

StringList

getUndoStack

core.getUndoStack() -> core.StringList

Returns

StringList

hasRecordingStep

core.hasRecordingStep() -> core.Boolean

Returns

Boolean

True if there is recoding step, else False

redo

core.redo(count=1)

Parameters

count UInt

startUndoRedoStep

core.startUndoRedoStep(stepName)

Parameters

stepName String

stopProcess

core.stopProcess()

toggleUndoRedo

core.toggleUndoRedo()

undo

core.undo(count=1)

Parameters

count UInt

getColorFromIndex

Returns a unique color associated with an index

core.getColorFromIndex(index) -> core.Color

Parameters

index Int

Index of the color (index must be less than 2^24)

Returns

Color

The unique color associated to the given index

addConsoleVerbose

core.addConsoleVerbose(level)

Parameters

level Verbose

Verbose level

addLogFileVerbose

core.addLogFileVerbose(level)

Parameters

level Verbose

Verbose level

addSessionLogFileVerbose

core.addSessionLogFileVerbose(level)

Parameters

level Verbose

Verbose level

configureInterfaceLogger

core.configureInterfaceLogger(enableFunction=True, enableParameters=True, enableExecutionTime=True)

Parameters

enableFunction Boolean

If true, the called function names will be print

enableParameters Boolean

If true, the called function parameters will be print (only if enableFunction=true too)

enableExecutionTime Boolean

If true, the called functions execution times will be print

getInterfaceLoggerConfiguration

core.getInterfaceLoggerConfiguration() -> core.Boolean, core.Boolean, core.Boolean

Returns

Boolean

True if the called function names are printed

getLogFile

core.getLogFile() -> core.OutputFilePath

Returns

OutputFilePath

Path of the log file

log

core.log(message, level)

Parameters

message String

Message to log

level Verbose

Verbose level

removeConsoleVerbose

core.removeConsoleVerbose(level)

Parameters

level Verbose

Verbose level

removeLogFileVerbose

core.removeLogFileVerbose(level)

Parameters

level Verbose

Verbose level

removeSessionLogFileVerbose

core.removeSessionLogFileVerbose(level)

Parameters

level Verbose

Verbose level

setCoreDumpFile

core.setCoreDumpFile(path)

Parameters

path OutputFilePath

Path of the core dump file

setLogFile

core.setLogFile(path)

Parameters

path OutputFilePath

Path of the log file

AfterEntityPropertyChanged

def onAfterEntityPropertyChanged(entity, property, entityType):
    pass

id = core.addAfterEntityPropertyChangedCallback(onAfterEntityPropertyChanged)

...

core.removeAfterEntityPropertyChangedCallback(id)

Parameters

entity Entity

Entity changed

property String

Property changed

entityType Int

Type of the entity changed

AfterModulePropertyChanged

def onAfterModulePropertyChanged(module, property):
    pass

id = core.addAfterModulePropertyChangedCallback(onAfterModulePropertyChanged)

...

core.removeAfterModulePropertyChangedCallback(id)

Parameters

module String

Module changed

property String

Property changed

AtExit

def onAtExit():
    pass

id = core.addAtExitCallback(onAtExit)

...

core.removeAtExitCallback(id)

BeforeEntityPropertyChanged

def onBeforeEntityPropertyChanged(entity, property):
    pass

id = core.addBeforeEntityPropertyChangedCallback(onBeforeEntityPropertyChanged)

...

core.removeBeforeEntityPropertyChangedCallback(id)

Parameters

entity Entity

Entity changed

property String

Property changed

BeforeModulePropertyChanged

def onBeforeModulePropertyChanged(module, property):
    pass

id = core.addBeforeModulePropertyChangedCallback(onBeforeModulePropertyChanged)

...

core.removeBeforeModulePropertyChangedCallback(id)

Parameters

module String

Module changed

property String

Property changed

BeforeSessionReset

def onBeforeSessionReset():
    pass

id = core.addBeforeSessionResetCallback(onBeforeSessionReset)

...

core.removeBeforeSessionResetCallback(id)

CurrentFileChanged

def onCurrentFileChanged():
    pass

id = core.addCurrentFileChangedCallback(onCurrentFileChanged)

...

core.removeCurrentFileChangedCallback(id)

EnteringUnsafeMode

def onEnteringUnsafeMode():
    pass

id = core.addEnteringUnsafeModeCallback(onEnteringUnsafeMode)

...

core.removeEnteringUnsafeModeCallback(id)

LeavingUnsafeMode

def onLeavingUnsafeMode():
    pass

id = core.addLeavingUnsafeModeCallback(onLeavingUnsafeMode)

...

core.removeLeavingUnsafeModeCallback(id)

OnConsoleMessage

def onOnConsoleMessage(text, verboseLevel):
    pass

id = core.addOnConsoleMessageCallback(onOnConsoleMessage)

...

core.removeOnConsoleMessageCallback(id)

Parameters

text String

Message content

verboseLevel Verbose

Verbose level

OnSessionReset

def onOnSessionReset():
    pass

id = core.addOnSessionResetCallback(onOnSessionReset)

...

core.removeOnSessionResetCallback(id)

ProgressChanged

def onProgressChanged(progress):
    pass

id = core.addProgressChangedCallback(onProgressChanged)

...

core.removeProgressChangedCallback(id)

Parameters

progress Int

Current progression

ProgressStepFinished

def onProgressStepFinished():
    pass

id = core.addProgressStepFinishedCallback(onProgressStepFinished)

...

core.removeProgressStepFinishedCallback(id)

ProgressStepStart

def onProgressStepStart(stepName):
    pass

id = core.addProgressStepStartCallback(onProgressStepStart)

...

core.removeProgressStepStartCallback(id)

Parameters

stepName String

Name of the started step

DebugEvent

def onDebugEvent(event_type):
    pass

id = core.addDebugEventCallback(onDebugEvent)

...

core.removeDebugEventCallback(id)

Parameters

event_type Int

The type of signal to emit

UndoRedoStackChanged

def onUndoRedoStackChanged():
    pass

id = core.addUndoRedoStackChangedCallback(onUndoRedoStackChanged)

...

core.removeUndoRedoStackChangedCallback(id)