How to copy objects from one file to another?

Status
Not open for further replies.

Lingsha

Usenet Archive
Joined
Dec 17, 2001
Messages
3
Reaction score
0
How do I use VB program to copy objects or layers from one file to another file without user intervention?

If I want to use code

acadDoc.sendcommand "_Copybase Specify base point:" & vbCr how to specific base point: 0,0?

I tried the following:
acadDoc.SendCommand "_Copybase Specify base point: (0,0)" & vbCr

It doesn't work. I need to move layer without user's input. Is it possible to do that? Thank you so much for your help.
 
(Lingsha) wrote:
How do I use VB program to copy objects or layers from one file to another file without user intervention?

If I want to use code

acadDoc.sendcommand "_Copybase Specify base point:" & vbCr how to specific base point: 0,0?

I tried the following:
acadDoc.SendCommand "_Copybase Specify base point: (0,0)" & vbCr

It doesn't work. I need to move layer without user's input. Is it ...

Try creating a collection of entities in the source drawing, activate the target drawing, then iterate through the collection and use the add method to create the entities in model space (or paper space).
 
(Lingsha) wrote:
How do I use VB program to copy objects or layers from one file to another file without user intervention?

If I want to use code

acadDoc.sendcommand "_Copybase Specify base point:" & vbCr how to specific base point: 0,0?

I tried the following:
acadDoc.SendCommand "_Copybase Specify base point: (0,0)" & vbCr

It doesn't work. I need to move layer without user's input. Is it ...

To answer your question about how to specify the base point:

ThisDrawing.SendCommand "_copybase" & vbCr & "0,0" & vbCr

Hint: Don't use parenthesis around the coordinates.
 
Status
Not open for further replies.

Latest threads

Back
Top