PDA

View Full Version : InsertBlock error, who can help me...



jeans
19th Jun 2005, 10:49 pm
I want to insert a block "M10.dwg" from a directory "C:\acad\blocks"

-----------------------------------------------------------------------------------
VBA-code:
BlockName = "C:\acad\blocks\M10"
Set blockObj = ThisDrawing.ModelSpace.InsertBlock(InsPnt, BlockName, 1#, 1#, 1#, 0)
-----------------------------------------------------------------------------------

when running the next message:
Invalid argument bstrName in InsertBlock

path and blockname are corectly, M10.dwg is in the directory,
Why is this not working??? :cry:

hendie
20th Jun 2005, 08:24 am
try adding the dot dwg extension to your filename.

jeans
20th Jun 2005, 10:15 am
try adding the dot dwg extension to your filename.

BINGO, it works!!

Thank you very much

Jan