第 第
第
1 1
1
章 章
章
G e t t i n g s t a r t e d w i t h s e r v e r c u s t o m i z a t i o n
Libraries Libraries
Libraries
A
library
isacollectionoffilesthatincludesprograms,helpercode,and
data.Keepthefollowinginmindwhenworkingwithlibraries:
•CreatealibraryintheAdvanced Advanced
Advanced
perspectiveoftheBusinessModelerIDE
byopeningtheCode Code
Code
Generation Generation
Generation
→Libraries Libraries
Libraries
foldersintheExtensions Extensions
Extensions
view,
right-clickingtheLibraries Libraries
Libraries
folder,andchoosingNew New
New
Library Library
Library
.
•AfteryouwriteyourC++code,chooseProject Project
Project
→Build Build
Build
Project Project
Project
inthe
BusinessModelerIDEtobuildthelibrariescontainingservercode.
•Ifyouhavecodefulcustomizations,youcannotdeployfromtheBusiness
ModelerIDEfortestingbecausecodefulcustomizationshavelibraries.
Instead,youmustpackageyourtemplatesothatlibrariesareplacedintoa
template-name
_rtserver.zip _rtserver.zip
_rtserver.zip
file,andtheninstallthepackagedtemplate
usingTeamcenterEnvironmentManager(TEM).
•Ensurethatlibrariesareplacedinthecorrectdirectories:
oEnsurethatbydefaulttheTC_LIBRARY TC_LIBRARY
TC_LIBRARY
environmentvariableissetto
TC_ROOT
\lib \lib
\lib
onallplatforms.
oPlacelibrariesforuserexits,serverexits,andcustomexits(supplier
customhooks)inthedirectoryspecifiedbytheTC_USER_LIB TC_USER_LIB
TC_USER_LIB
environment
variable(preferred),theTC_BIN TC_BIN
TC_BIN
environmentvariable(forWindows),or
theTC_LIBRARY TC_LIBRARY
TC_LIBRARY
environmentvariable(forUNIX).
oPlacelibrariesforlegacyoperationsinanydirectoryaslongasitis
listedintheBMF_CUSTOM_IMPLEMENTOR_PATH BMF_CUSTOM_IMPLEMENTOR_PATH
BMF_CUSTOM_IMPLEMENTOR_PATH
preference.
oPlacelibrariesfortheC++operationsinthedirectoryspecifiedby
theTC_USER_LIB TC_USER_LIB
TC_USER_LIB
environmentvariable(preferred)ortheTC_LIBRARY TC_LIBRARY
TC_LIBRARY
environmentvariable(WindowsandUNIX).
Note Note
Note
ForITK,asofTeamcenter8.1,themem.h mem.h
mem.h
headerfilemovedfrom
thelibitk libitk
libitk
librarytothelibbase_utils libbase_utils
libbase_utils
library.Themem.h mem.h
mem.h
header
filecontainslow-levelmethodsrelatedtomemoryallocationand
release.Thesemethodswereexportedfromthelibitk libitk
libitk
libraryandhad
circulardependencieswithsomeapplicationlibrariesthataffected
delayloadingoflibraries.Toaddressthisissue,anewlow-level
libbase_utils libbase_utils
libbase_utils
libraryisintroduced.Thefunctionsinthemem.h mem.h
mem.h
file
arenowexportedfromthisnewlibrary.
Theoldheadermem.h mem.h
mem.h
filestillexistsandincludesthenew
base_utils/Mem.h base_utils/Mem.h
base_utils/Mem.h
header.Existingcustomizationcodeshouldcompile
withoutanychanges.However,asthefunctionsarenowexportedfrom
thelibbase_utils libbase_utils
libbase_utils
library,theexistinglinkdependencyonthelibitk libitk
libitk
librarydoesnotwork.
Foranycustomcodeusingfunctionsfromthemem.h mem.h
mem.h
file,linkdependency
onthelibbase_utils libbase_utils
libbase_utils
librarymustbeadded.Forcodewhereusageof
thelibitk libitk
libitk
libraryislimitedtoonlyfunctionsfromthemem.h mem.h
mem.h
file,
theexistingdependencyonthelibitk libitk
libitk
librarycanberemovedinits
entirety.
1-10 1-10
1-10
Server Customization Programmer’s Guide
PLM00074 PLM00074
PLM00074
J J
J