The cenpylib package (CENIT Python Library) was developed by CENIT AG for use with FASTSUITE Edition2 application and is a utility library designed to simplify standard function calls. Also, one of the main functions of cenpylib is to provide IntelliSense functionality. Please, see IntelliSense settings for needed setup steps.
[Example 1]
# Import library
from cenpylib import *
# Usage: specify the operator's class
def ModifyActiveProgram(operator: CENPyOlpProgramModifyOperator):
# Result: IntelliSense will provide you with all available functions
logging = operator.GetLoggerOperator()
program = operator.GetActiveProgram()
logging.LogInfo("Program name: "+str(program.GetName()))
...
[Example 2]
from cenpylib import *
def ModifyActiveProgram(Operator: CENPyOlpProgramModifyOperator):
logging = Operator.GetLoggerOperator()
# Use file utility to access the paths of CENIT and E2 logos
fileUtility = FileUtility()
logging.LogInfo(f"CENIT logo black path: {fileUtility.CENIT_LOGO_BLACK}")
logging.LogInfo(f"CENIT logo green path: {fileUtility.CENIT_LOGO_GREEN}")
logging.LogInfo(f"FASTSUITE E2 icon path: {fileUtility.FASTSUITE_E2_ICON}")
logging.LogInfo(f"FASTSUITE E2 logo path: {fileUtility.FASTSUITE_E2_LOGO}")
[Example 3]
from cenpylib import *
def ModifyActiveProgram(Operator: CENPyOlpProgramModifyOperator):
logging = Operator.GetLoggerOperator()
# Use file utility to access the paths of CENIT and E2 logos
# ======== create a PDF Report =============
pdf = ReportUtility()
pdf.createAutoExecutePDFReport(Operator, "")
|