Delphi Equivalent

Discussion in 'AutoCAD' started by Joe C. Parker, Jun 17, 2004.

  1. Dim objary(0 To 0) As Object

    var
    objary[0..0] As Object;
    Are these equivalent
     
    Joe C. Parker, Jun 17, 2004
    #1
  2. Joe C. Parker

    Jackrabbit Guest

    [pre]
    Are you declaring a dynamic array?

    var
    objectArray: array of AcadObject;
    begin
    ...
    SetLength(objectArray, 10);
    ...
    end;
    [/pre]
     
    Jackrabbit, Jun 17, 2004
    #2
  3. trying to use copyobjects
    i think i found it assuming FDrg is the document and reg is a region
    var
    objary:OleVariant;
    p:OleVariant;
    begin
    objary:=VarArrayCreate([0,0],varDispatch);
    objary[0]:=reg as IDispatch;
    p := FDrg.CopyObjects(objary, calc,EmptyParam);
    cheers
    Joe Parker
     
    Joe C. Parker, Jun 17, 2004
    #3
  4. You got it.

    If you only have one object (or several assigned to
    variables), you can do it like this:

    obj.CopyObjects( VarArrayOf([SomeAcadObject]), ownerObj, EmptyParam);



    AutoCAD based Security Planning Solutions:
    http://www.caddzone.com/securityplanning
     
    Tony Tanzillo, Jun 17, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.