title: Autoit: create variant "array of doubles"?
body: <p>I'm trying add a point in currently opened Autocad drawning. As reference I'm using VBA example from <a href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2019/ENU/AutoCAD-ActiveX-Reference/files/GUID-9D3A7DE5-4219-42D8-A2A2-20C723F01ABC-htm.html" rel="nofollow noreferrer">AddPoint</a> manual:</p>
  
  <blockquote>
    <p><strong>VBA:</strong></p>
    
    <p><code>RetVal = object.AddPoint(Point)</code></p>
    
    <p><strong>object</strong></p>
    
    <p><strong>Type:</strong> Block, ModelSpace, PaperSpace</p>
    
    <p>The objects this method applies to.</p>
    
    <p><strong><em>Point</em></strong></p>
    
    <p><strong>Access:</strong> Input-only</p>
    
    <p><strong>Type:</strong> Variant (three-element array of doubles)</p>
    
    <p>The coordinates of the point to be created.</p>
  </blockquote>
  
  <pre><code>Sub Example_AddPoint()
      ' This example creates a point in model space.
      Dim pointObj As AcadPoint
      Dim location(0 To 2) As Double
  
      ' Define the location of the point
      location(0) = 5#: location(1) = 5#: location(2) = 0#
  
      ' Create the point
      Set pointObj = ThisDrawing.ModelSpace.AddPoint(location)
      ZoomAll
  
  End Sub
  </code></pre>
  
  <p>So far I'm successfully connected to ActiveX object and can get/set many things with it (as long as it requires a string input), except I can't figure out how create a </p>
  
  <blockquote>
    <p>Variant (three-element array of doubles)</p>
  </blockquote>
  
  <p>required for AddPoint function</p>
  
  <p>Here is autoit code I'm playing with:</p>
  
  <pre><code>Local $location[3] = [5.0,5.0,0.0]
  Local $oAcad = ObjGet("","AutoCAD.Application")
  $oAcad.ActiveDocument.Modelspace.AddPoint($location)
  </code></pre>
  
  <p>It returns error:</p>
  
  <pre><code>"1.au3" (3) : ==&gt; The requested action with this object has failed.:
  $oAcad.ActiveDocument.Modelspace.AddPoint($location)
  $oAcad.ActiveDocument.Modelspace^ ERROR
  </code></pre>
  
  <p>There is no details about error even with error handler, so I assume datatype of $location variable is wrong.</p>