MINSERT Using VBA

MINSERT Using VBA

Anonymous
Not applicable
704 Views
1 Reply
Message 1 of 2

MINSERT Using VBA

Anonymous
Not applicable

Hello All,

 

I am writing a simple line of VBA Code that simply will not cooperate.

 

No matter what I do, when the command executes it dose not behave as expected.

 

For some reason when the code executes it acts as if the is one to many VbCr statements when I cant find one. 

 

Below is the lien of VBA code and the result from ACAD command line.

 

ACAD 2017

 

Any help greatly appreciated.

 

The Code:

 

ThisDrawing.SendCommand "._minsert " & " BlockName " & vbCr & " 0,0,0 " & vbCr & vbCr & vbCr & " 5 " & vbCr & " 5 " & vbCr & "65.11" & vbCr & "39.31" & vbCr

 

The Output from ACAD Command Line:

 

Command: ._minsert Enter block name or [?]:  BlockName
Units: Inches   Conversion:    1.0000
Specify insertion point or [Basepoint/Scale/X/Y/Z/Rotate]:
Point or option keyword required.
Specify insertion point or [Basepoint/Scale/X/Y/Z/Rotate]: 0,0,0
Enter X scale factor, specify opposite corner, or [Corner/XYZ] <1>:
Enter Y scale factor <use X scale factor>:
Specify rotation angle <0>:
Enter number of rows (---) <1>:
Enter number of columns (|||) <1>: 5
Specify distance between columns (|||):
Requires numeric distance or two points.
Specify distance between columns (|||):
Requires numeric distance or two points.
Specify distance between columns (|||): 5
Command:
65.11
Unknown command "11".  Press F1 for help.
Command: 39.31
Unknown command "31".  Press F1 for help.

0 Likes
Accepted solutions (1)
705 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

Problem solved. For anyone who is interested, see blow for using Minsert in VBA.

 

Signature

RetVal = object.AddMInsertBlock(InsertionPoint, Name, XScale, YScale, ZScale, Rotation, NumRows, NumColumns, RowSpacing, ColumnSpacing [, Password])

0 Likes