在imakfile.mk中添加引用API所在的模块名,最终完成如下:
# COPYRIGHT DassaultSystemes 2013
#======================================================================
# Imakefile for module PartDesignAddin.m
#====================================================================== #
# Apr 2013 Creation: Code generated by the CAA wizard Administrator
#====================================================================== #
# SHARED LIBRARY #
BUILT_OBJECT_TYPE=SHARED LIBRARY
# DO NOT EDIT :: THE CAA2 WIZARDS WILL ADD CODE HERE
WIZARD_LINK_MODULES = JS0GROUP
JS0FM JS0GROUP CATMechanicalModelerUIMechanicalModelerUIUUID
# END WIZARD EDITION ZONE
LINK_WITH = $(WIZARD_LINK_MODULES)
CATApplicationFrame
# System dependant variables
#
OS = AIX #
OS = HP-UX #
OS = IRIX #
OS = SunOS #
OS = Windows_NT
5. 编译Module(MKMK)
参照前面的方式对模块进行编译,输出窗口如下:
6. 更新运行环境(Create/Update Runtime View...)
使用“Create/Update Runtime View...”命令,更新运行环境:
7. 执行CNEXT命令
参照第3节的步骤,在Runtime Window中输入CNEXT命令,进入零件设计模块,可以看到在已经增加了一个名称为MyCenterLine的工具栏: