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\Alias2012\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\Alias2012\\bin (Sets Path variable so .dlls can be found .)
.\cppCreate.exe new.wire (Run an example.)
Notes
- You may need to change the copy path in the OpenModel example directory above depending on the location of your Aliasinstall directory. In addition, you will require the Microsoft Visual Studio bin directory 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 version 2012 that compiler is VC9.0 and it comes with Visual Studio 2008.
- An installed copy of Alias2012.
Next you need to identify the following paths:
- The plug-in .cpp files are located in your Alias2012 install directory under ...\ODS\OpenAlias\examples\
- The plug-in include files (.h files) are located in your Alias2012 install directory under ...\ODS\Common\include\
- The plug-in scheme files (.scm files) are located in your Alias2012 install directory under ...\ODS\OpenAlias\examples\scm\
- The Makefile is located in your Alias2012 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 2008 install directory. There will be two versions: a 32-bit and a 64-bit. Make sure
to use the correct version.
The batch files used to set the development paths are called vcvars32.bat (for 32bit) and vcvarsamd64.bat (for 64 bit) and are also located in the Visual Studio 2008 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)
vsvars32.bat (or vcvarsamd64.bat for 64-bit. This sets the development path to use the compiler.)
- Open the Makefile (using Notepad or any text editor) and set ALIAS_LOCATION to the Alias2012 install directory. This is usually C:\Program Files\Autodesk\Alias2012 (Windows) or /Applications/Autodesk/Alias2012/Alias.app/Contents/Resources (Mac).
- 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 copy
Note
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 \examples directory, the \include directory, and the \scm directory).
Note
If you are using a 64 bit machine and have both a 32-bit and a 64-bit installation of Alias, make sure to use the correct
install path depending on whether you are attempting to complile a 32-bit or 64-bit plug-in.
- Add the \bin and \lib directories for the Alias2012 install to the path. (Again match 32 bit or 64 bit paths if you have both.)
- Type the following in the command window to compile the plug-ins:
The built plug-ins can now be loaded through the Plug-in Manager.
Notes
- You may need to change the copy path to the OpenAlias example directory above depending on the location of your Aliasinstall directory. In addition, you will require the Microsoft Visual Studio bin directory to be in your path.