Mark Propst
Usenet Archive
- Joined
- May 2, 2000
- Messages
- 492
- Reaction score
- 0
Hi
I'm trying to insert a block via objectdbx.
The block gets inserted but the dwg needs recovered to open. The error says linetype not found in symbol table or something to that effect.
any clues what I'm doing wrong here?
this is the function that inserts the block, I assume that's the problem
(defun putblockpt2(doc inBname inbPt space blocksourcedir / rtnobj varpt resitem blockCol) (setq blockCol(vlax-get doc "blocks")) (setq varpt(vlax-make-variant (vlax-3d-point inbPt) vlax-vbvariant) ) (setq resitem (vl-catch-all-apply 'vla-item (list blockCol (vlax-make-variant inbName vlax-vbstring) ) );catch );setq
(if (vl-catch-all-error-p resitem)
(progn
(setq blkDir blocksourcedir)
(setq bfname(strcat blkdir inbname ".dwg"))
(cond
((setq blkFileName(findfile bfname))
(setq inbname blkFileName)
)
(1
(setq inbname nil)
)
);cond
);progn
);if
(if inbname
(progn
(setq rtnobj
(vl-catch-all-apply
'vla-insertblock
(list
space
(vlax-3d-point inbPt)
(vlax-make-variant inbName vlax-vbstring)
(vlax-make-variant 1.0 vlax-vbdouble)
(vlax-make-variant 1.0 vlax-vbdouble)
(vlax-make-variant 1.0 vlax-vbdouble)
(vlax-make-variant 0.0 vlax-vbdouble)
);list
);catch
);rtnobj
(if(vl-catch-all-error-p rtnobj)
(setq rtnobj nil)
)
);progn
);if
rtnobj
)
tia
Mark
I'm trying to insert a block via objectdbx.
The block gets inserted but the dwg needs recovered to open. The error says linetype not found in symbol table or something to that effect.
any clues what I'm doing wrong here?
this is the function that inserts the block, I assume that's the problem
(defun putblockpt2(doc inBname inbPt space blocksourcedir / rtnobj varpt resitem blockCol) (setq blockCol(vlax-get doc "blocks")) (setq varpt(vlax-make-variant (vlax-3d-point inbPt) vlax-vbvariant) ) (setq resitem (vl-catch-all-apply 'vla-item (list blockCol (vlax-make-variant inbName vlax-vbstring) ) );catch );setq
(if (vl-catch-all-error-p resitem)
(progn
(setq blkDir blocksourcedir)
(setq bfname(strcat blkdir inbname ".dwg"))
(cond
((setq blkFileName(findfile bfname))
(setq inbname blkFileName)
)
(1
(setq inbname nil)
)
);cond
);progn
);if
(if inbname
(progn
(setq rtnobj
(vl-catch-all-apply
'vla-insertblock
(list
space
(vlax-3d-point inbPt)
(vlax-make-variant inbName vlax-vbstring)
(vlax-make-variant 1.0 vlax-vbdouble)
(vlax-make-variant 1.0 vlax-vbdouble)
(vlax-make-variant 1.0 vlax-vbdouble)
(vlax-make-variant 0.0 vlax-vbdouble)
);list
);catch
);rtnobj
(if(vl-catch-all-error-p rtnobj)
(setq rtnobj nil)
)
);progn
);if
rtnobj
)
tia
Mark