One advantage of using the Terrasolid modules in Bentley applications is that users can leverage the large number of tools therein. For example, Bentley products support VBA, which can be used to automate routine tasks. Controlling TerraScan with VBA is possible as well.
SetCExpressionValue (CExpression as String, New value, MdlApplicationName As String) can be used to set a variable, when the variable name is known. We don’t currently have a known list of these variables, but will try to get one from the Terrasolid development team.
CadInputQueue.SendKeyin “Keyin As String” can be used to send any key-in via the VBA script. For example:
CadInputQueue.SendKeyin “draw vertical section”
CadInputQueue.SendKeyin “scan run macro c:\mymacro.mac”
See TerraScan key-ins for examples and known parameters.