本篇基於SolidEdge官方的Github範例延伸筆記
註冊元件的方式透過Visual Installer安裝時,同時註冊AddIn元件
首先,AddIn元件本身需要註冊程式,將外掛模組註冊哪些SolidEdge作業環境
Guid[] environments = {
SolidEdgeSDK.EnvironmentCategories.Application,
SolidEdgeSDK.EnvironmentCategories.AllDocumentEnvrionments
};
@echo off
set ADDIN_PATH="%~dp0%TLTC_SE_AddIn.dll"
set REGASM_X86="C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe"
set REGASM_X64="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe"
CLS
echo %ADDIN_PATH%
echo This batch file must be executed with administrator privileges!
echo.
set REGASM_PATH86=%REGASM_X86%
set REGASM_PATH64=%REGASM_X64%
%REGASM_PATH86% /codebase %ADDIN_PATH%
%REGASM_PATH64% /codebase %ADDIN_PATH%
:end
在cmd.exe的屬性Arguments 輸入 /c "[TARGETDIR]\RegistrationALL.bat"