Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to copy contents of another file into the active document. I have found numerous example on the net for this - none working for me. Below is the code I'm using and it is the n-th iteration - a mixture of what I thoght would work:
(defun openblk (/ adocs)
(setq tl_path "G:\\temp\\transform2000toLocal.dwg")
(setq acDocs (vla-get-documents (vlax-get-acad-object)))
(setq nWin (vla-open acDocs tl_path))
(vla-sendcommand nWin (strcat "copyclip " "w " "0,0 " "74200000,58400000 "))
(vla-sendcommand nWin " ")
(vla-close nWin :vlax-false)
(command "pasteorig")
)
(openblk)
Contrary to what I would like it to do, it selects objects for copyclip from the original file and not the opened file and then it hangs on "Select objects:" query - thus the second vla-sendcommand. It never runs it though.
What I would like it to do is to open specific file, copy to clipboard from the opened file and paste to the original coordinates in the original file. I don't know what else to try. Can you help?
Cheers
Solved! Go to Solution.