05-24-2018 02:52 AM - edited 05-24-2018 02:54 AM
I'm new to the Spatial Modeler SDK and I'm trying to set up my developers environment.
Succesfull so far:
My first question is:
How do I tell the Spatial Modeler Editor to look in the examples plugin also?
In Extending Spatial Modeler it says : "Another way to define the location of a plugin DLL is through an XML file located in Spatial Modeler’s path" but it doesn't say what the name of the file should be. And what is the Spatial Modeler's path??
I was able to build the examples only from the examples directory. Moving the code to another directory didn't work, because lots of files could not be found. How do I set up everything in Visual Studio so I can use a custom path for my code?
Do I really have to restart the Spatial Modeler Editor every time I compile again? Or is there a quicker developer cycle?
05-24-2018 12:05 PM
First answer: The "Spatial Modeler's path" is the directories specified above the statement you quote (the bulletted list and the two paragraphs that surround it).
Second answer: You can modify the .props file that accompanies each example (in the directory with the sources and .vcxproj).
Third answer: Yes, you have to restart the Spatial Model Editor in order to compile and test your changes (assuming that your plugin has already been successfully loaded into memory).
05-24-2018 11:54 PM
ad 1) ok, the path is clear. But what about 'an XML file located in Spatial Modeler’s path'. What should the name of the XML-file be?
ad 2) I notice in the props that there are references to $(SpatialModelerSDKHome) and $(SpatialModelerSDKExampleIntDir), etc. I did something yesterday that caused these variables to vanish. Where are they set?
05-25-2018 06:50 AM
1. The XML file can have any name as long as it has a .xml extension. Spatial Modeler will pick up any .xml file in the path.
2. Those variables are defined at the top of the .props file. Below is the original contents of the .props file for Example 1 (smNDVIExanple) in case you've "corrupted" your .props files.
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ImportGroup Label="PropertySheets" /> <PropertyGroup Label="UserMacros"> <SpatialModelerSDKHome>..\..\..</SpatialModelerSDKHome> <SpatialModelerSDKExampleIntDir>$(Platform)$(Configuration)\</SpatialModelerSDKExampleIntDir> </PropertyGroup> <PropertyGroup /> <ItemDefinitionGroup /> <ItemGroup> <BuildMacro Include="SpatialModelerSDKHome"> <Value>$(SpatialModelerSDKHome)</Value> </BuildMacro> <BuildMacro Include="SpatialModelerSDKExampleIntDir"> <Value>$(SpatialModelerSDKExampleIntDir)</Value> </BuildMacro> </ItemGroup> </Project>