I don't think the SendCommand is going to let the pause work. Better get the point first, then pass it to the function.
Why use SendCommand in this case anyway?


Registered forum members do not see this ad.
I know there are folks on here that are not fans of the SendCommand, but I still have a question about it.
I have a command string that I can run from the command line for inserting blocks and it pauses on insertion point and rotation.
Now, when I put into VBA, I reformat it like so:Code:(command "-insert" "chroma" pause "1" "1" pause)
What it seems to be doing is humming past the first pause and entering the "1" for scaling as an insertion point. Then it goes to the end and pauses for user input on rotation. What is going wrong here?Code:ThisDrawing.SendCommand ("-insert" & vbCr & "chroma" & vbCr & pause & vbCr & "1" & vbCr & "1" & vbCr & pause
Thanks!
A baby seal walks into a club....




I don't think the SendCommand is going to let the pause work. Better get the point first, then pass it to the function.
Why use SendCommand in this case anyway?
Code:Sub Chroma_Insert() ThisDrawing.SendCommand ("(command ""-insert""" & Chr(13) & _ """chroma"" pause ""1"" ""1"" pause)" & vbCr) End Sub![]()




Registered forum members do not see this ad.
Code:Sub InsertChroma() Dim newBlock As AcadBlockReference Dim pt As Variant, blk As String pt = ThisDrawing.Utility.GetPoint(, "Select Point ") blk = "chroma.dwg" Set newBlock = ThisDrawing.ModelSpace.InsertBlock(pt, blk, 1#, 1#, 1#, 0#) End Sub
Bookmarks