NavisworksTransport/compile.bat
2025-07-18 13:32:50 +08:00

57 lines
2.0 KiB
Batchfile

@echo off
echo Building NavisworksTransport Plugin with Model Splitter...
REM Set MSBuild path (adjust if needed)
set MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe"
REM Check if MSBuild exists, try alternative paths
if not exist %MSBUILD_PATH% (
set MSBUILD_PATH="C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe"
)
if not exist %MSBUILD_PATH% (
set MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe"
)
if not exist %MSBUILD_PATH% (
echo MSBuild not found. Trying dotnet build...
dotnet build NavisworksTransportPlugin.csproj --verbosity minimal
goto :end
)
echo Using MSBuild: %MSBUILD_PATH%
REM Build the project
echo Building project...
%MSBUILD_PATH% NavisworksTransportPlugin.csproj /p:Configuration=Debug /p:Platform="Any CPU" /p:TargetFrameworkVersion=v4.6.2
:end
if %ERRORLEVEL% EQU 0 (
echo.
echo ========================================
echo Build successful!
echo ========================================
echo.
echo Plugin files have been built and should be copied to:
echo %PROGRAMFILES%\Autodesk\Navisworks Manage 2017\Plugins\NavisworksTransportPlugin\
echo.
echo New Model Splitter features added:
echo - ModelSplitterManager: Core splitting logic
echo - FloorDetector: Automatic floor detection
echo - AttributeGrouper: Group by custom attributes
echo - NavisworksFileExporter: Export model subsets
echo - ModelSplitterDialog: User interface
echo.
echo To use the model splitter:
echo 1. Open a Navisworks model
echo 2. Launch the Transport Plugin
echo 3. Go to System Management tab
echo 4. Click "Model Layer Splitter" button
echo.
) else (
echo.
echo ========================================
echo Build failed!
echo ========================================
echo Please check the error messages above
)
pause