Building the API examples on Windows
OpenModel
To build the OpenModel examples, type the following in a command prompt window and exclude any text in brackets:
mkdir examples
cd examples
copy c:\Program Files\Autodesk\Alias2023\ODS\OpenModel\examples\Makefile .
notepad Makefile (Set ALIAS_LOCATION variable to correct path.)
vsvars32.bat (Set the Visual C++ environment variables.)
nmake copy (Copies example code into the current directory.)
nmake
set Path=%Path%;c:\Program Files\Autodesk\Alias2023\\bin (Sets Path variable so .dlls can be found .)
.\cppCreate.exe new.wire (Run an example.)Notes
- You may need to change the
copypath in the OpenModel example directory above depending on the location of your Aliasinstalldirectory. In addition, you will require the Microsoft Visual Studiobindirectory to be in your path. - You must set the Path variable so that it includes the location of Alias bin directory so that the OpenModel .dll’s can be found.
OpenAlias
To build the OpenAlias example plug-ins, you need the following installed on your machine:
- A compatible C++ compiler. For the current version the compiler is MicrosoftVisual Studio 2022 (VC 14.3).
- An installed copy of Alias.
Next you need to identify the following paths:
- The plug-in
.cppfiles are located in your Alias2023 install directory under...\ODS\OpenAlias\examples\ - The plug-in include files (
.hfiles) are located in your Alias2023 install directory under...\ODS\Common\include\ - The Makefile is located in your Alias2023 install directory in
...\ODS\OpenAlias\examples\Makefile
The program you use to run the Makefile is called nmake.exe and is located in the Visual Studio install directory.
The batch file used to set the development paths is called vcvars64.bat and is also located in the Visual Studio install directory.
Run cmd.exe to open the command prompt window then follow these steps.
Set the development path by typing the following in the command prompt window. (Exclude any text in brackets.)
set PATH= (This clears your path to prevent the compiler from accidently finding old versions of DLLs or LIBs) vcvars64.bat. This sets the development path to use the compiler.Open the Makefile (using Notepad or any text editor) and set
ALIAS_LOCATIONto the Alias2023 install directory. This is usuallyC:\Program Files\Autodesk\.Create a new directory where you want to build the plug-ins, and copy the Makefile and example code into it.
mkdir <directory_name> cd <directory name> copy [ALIAS_LOCATION]\ODS\OpenAlias\examples\Makefile . nmake copyNote:If you want, you can compile the examples directly into the
...\ODS\OpenAlias\examples\directory and skip this step.Add the directories listed above to your path, that is, the
\examplesdirectory, and the\includedirectory.Note:Add the
\binand\libdirectories for the Alias2026 install to the path.Type the following in the command window to compile the plug-ins:
nmake
The built plug-ins can now be loaded through the Plug-in Manager.
Notes
- You may need to change the
copypath to the OpenAlias example directory above depending on the location of your Aliasinstalldirectory. In addition, you will require the Microsoft Visual Studiobindirectory to be in your path.
