vlainsertblock error

Mark Propst

Usenet Archive
Joined
May 2, 2000
Messages
492
Reaction score
0
paste from vlide console

VALIDBLOCKNAME is :
Z:\0\DbxSourceBlock.dwg

error message:
Automation Error. Invalid argument bstrName in InsertBlock

code line creating error
(vla-insertblock
ps;paperspace object
(vlax-3d-point inbPt);insertion point
ValidBlockName;string name
1
1
1
0)

I'm not seeing what's wrong with the string name, anyone? tia Mark
 
This give you a clue?
_$ (setq ValidBlockName (findfile "l:\\test.dwg"))
"L:\\test.dwg"
_$ (vla-insertblock
ps;paperspace object
(vlax-3d-point '(0.0 0.0 0.0));insertion point
ValidBlockName;string name
1
1
1
0)
#<VLA-OBJECT IAcadBlockReference 06e8e954>
_$
_$ (setq ValidBlockName "L:\TEST.DWG")
"L:TEST.DWG"
_$ (vla-insertblock
ps;paperspace object
(vlax-3d-point '(0.0 0.0 0.0));insertion point
ValidBlockName;string name
1
1
1
0)
; error: Automation Error. Invalid argument bstrName in InsertBlock _$

Jeff
 
Yeah, I should have shown the code creating the printout, not just the printout the entered string is "Z:\\0\\DbxSourceBlock.dwg" the printout at the vlide console deletes the extra backslash seems to be another dbx anomally the same exact string filename works with vlax-invoke-method 'insertBlock in a native dwg but not in a dbx call the string also passes findfile before getting to this point in the prog. if I use Jeff's copyobjects method with dbx it works fine I was just still seeing if I could find some trick to get insertblock to work with dbx. just stubborn i guess...
:-)~
 

Latest threads

Back
Top