From version 4, ‘Spatial Manager for AutoCAD/BricsCAD’ includes the command “-SPMIMPORT” (notice the hyphen), which is a “command line” version of the “SPMIMPORT” command designed to allow the executing of Tasks from the command line, Scripts, VBA, LISP, etc.
The Tasks technology allows ‘Spatial Manager’ users to save all the steps and configuration needed to perform a specific Importing process in order to comfortably repeat this process as many times as they want to do it
The result is very useful when there are processes of importing tables from files, servers or data stores into your drawings, which are executed on a regular basis. Especially when these processes require the introduction of several more or less complex parameters of the data source/target and of the importing process itself, defining a coordinate transformation between the origin and target (drawing), etc.
Executing “Tasks” from the command-line (-SPMIMPORT TaskName)
“-SPMIMPORT” adds a new dimension to the execution of repetitive processes since it supports wildcards in the “Task name” parameter. For example, the following command will execute all the Tasks whose name starts with “RED”:
In this way, the following AutoCAD/BricsCAD Script will execute all the Tasks covered by the names and wildcards in the first three lines and it will change some properties of the Layer “LOCAL” (which may be created automatically in the importing process):
-LAYER LW 0.50 LOCAL
Note: You can write any Script by means of a simple text editor such as Windows Notepad (save with *.scr extension), and execute them using the command SCRIPT