Using SpaModeler

Alexandr Bryzgalin
November 16, 2017

Tags: Example getting started

This article describes how to create the SpaModeler module and use it in the ODAMfcApp sample application. First, download the source by checking out the Drawing submodule. SpaModeler is in Drawing\Source\SpaModeler. Next:

1. Check out third-party Spatial from https://svn.opendesign.com/svn/internal/trunk/ThirdPartyProtected/Spatial/acisCurrent.

2. Set an environment variable SPATIAL_DIR to the previous folder. For example, if you check out third-party Spatial to d:\R24sp1, set SPATIAL_DIR to D:\R24sp1.

3. Check out SpaUnlock from https://svn.opendesign.com/svn/internal/trunk/ThirdPartyProtected/Spatial/SpaUnlock to the main folder. For example, if the main folder is D:\main\, after checking out SpaUnlock, you get SpaUnlock.cpp in the D:\!work\main\SpaUnlock folder.

4. Run ODAProjectFileGenerator.exe and check the option for SpaModeler.

image1

SpaModeler project generation

5. Build the solution included in the SpaModeler project. You will have compiled SpaModeler_4.3src_14.tx, where number 4.3 is the current version (it may be different from version to version).

6. Go to the folder where you downloaded Spatial ThirdParty libraries (for example, D:\R24sp1\bin). There are a few folders; each folder contains libraries for a specific version of Microsoft® Visual Studio® and a specific platform (x86/x64, release/debug). Copy all DLL libraries from the folder that matches your Visual Studio and platform. For example, for VS10 and the generated solution for platform debug x86, copy all DLLs from D:\R24sp1\bin\NT_VC10_DLLD\code\bin to D:\main\exe\vc10dlldbg, where D:\main\exe\vc10dlldbg is the folder where the binaries are compiled. If you use a version of Visual Studio later than v.12, install Visual C++ Runtime (Redistributable for Visual Studio 2012) and copy DLLs from D:\R24sp1\bin\NT_VC12_DLLD\code\bin to D:\main\exe\vc14dlldbg.

7. Run ODAMfcApp.exe.

8. Choose Tools->LoadApplication.

9. In the window that appears, click Load and load the compiled SpaModeler module (for example, SpaModeler_4.3src_14.tx).

That’s all!

If there are errors, check that a mistake was not made by copying the wrong libraries in Step 6 or compiling a SpaModeler version that differs from the current version.

All posts