You are here: Surpac Concepts > Macros > SCL > Block Model Commands > SclBlockModelGetCurrentModel
GEOVIA Surpac

SclBlockModelGetCurrentModel

Overview

You use this command to find the handle value of the block model that is currently open in Surpac.

Synopsis

SclBlockModelGetCurrentModel

Description

Gets the handle of the current block model.

Returns

Returns the handle of the block model that is open in Surpac. If no block model is open in Surpac, this command returns 0, and you see the message "Warning: You must select a model first".

Examples

#Retrieve the list of attribute names and types for the 
#currently open block model.
#Output them to the Surpac output window.
set bm [SclBlockModelGetCurrentModel]
set result [SclBlockModelGetAttributes $bm attributeNames attributeTypes]
puts "Attribute Names: $attributeNames"
puts "Attribute Types: $attributeTypes"