CreateTypedArray Method

Back to Methods Reference

Creates a variant that contains an array of typed arguments.


VBA : Object.CreateTypedArray(VarArr, Type, Value1, [value2, value3, ...valueN])

VL : vla-CreateTypedArray Object VarArr Type Value1 [value2 value3 ...valueN]

(vla-CreateTypedArray util 'thearray vlax-vbDouble 1.2 2.3 0.0)

  • Object : Utility
    The object or objects this method applies to.

  • VarArr : Variant; output-only
    The array of values as a variant.

  • Type : Visual Lisp Constant; input-only
    The type of values you are supplying.
    vbBoolean, vbInteger, vbLong, vbSingle, or vbDouble.

  • Value1 [Value2, ...ValueN.]
    Of the type specified in the Type parameter above; input-only
    The value(s) to be included in the variant.


The resulting variant can be passed into any AutoCAD method or property that accepts an array of numbers as a variant.

Example :

;get a reference to the Utilities Object :

(setq util (vla-get-utility 

(vla-createtypedarray util 'thearray vlax-vbDouble 1.2 2.3 0.0)

;Your safearray is stored in the variable "thearray"

The AutoLisp/Visual Lisp/VBA Resource Website
Search the WWW Search AfraLisp

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website