I want to insert a stored block into a drawing (model space). Below is the code I'm using and I get
Runtime Error '5': Invalid procedure call or argument.
Any suggestions would be much appreciated.
Thanks
Sub Dummy()
Dim COESTD_obj As AcadBlockReference, InsPtStd(0 To 2) As Long, COESTD As String
COESTD = "C:\Jim\HYDRO\CAD_Dwgs\ZBlocks\ZZ_COE_STDS.dwg"
InsPtStd(0) = 0#: InsPtStd(1) = 0#: InsPtStd(2) = 0# 'Set insertion point as 0,0,0
Set COESTD_obj = ThisDrawing.ModelSpace.InsertBlock(InsPtStd, COESTD, 1#, 1#, 1#, 0#)
End Sub
Solved! Go to Solution.
Solved by Alfred.NESWADBA. Go to Solution.
Hi,
I guess that declaration is not ok for AutoCAD:
InsPtStd(0 To 2) As Long ==> should be Double
- alfred -