Command-line Importing. Scripts

November 02, 2017

CAD L2 (Medium) / ,

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.

Related videos: AutoCAD / BricsCAD

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.

Spatial Manager Task Manager

Spatial Manager Task Manager

Please, take a look to this Blog post and this Wiki article (AutoCAD/BricsCAD) if you want to learn more about “Tasks”

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):


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




Review Date
Reviewed Item
Author Rating