Jump to content

Recommended Posts

Posted

I have started a routine that will allow me to copy entities from an existing drawing and place them in a new drawing from a custom template. My method involves a selection set with a basepoint, using the copybase command. I use the following code to start my new drawing.

 

 
(vla-activate(vla-add(vla-get-documents(vlax-get-acad-object)) "CFP STANDARD.DWT"))

 

The problem is that the rest of the code, which is a simple pasteclip to 0,0, doesnt work in the new drawing. It will start a new drawing, then paste the selection set back in to the original drawing. How do I get the code to work in the NEW drawing???

Posted

I dont see anything in your post, Lee...

Posted
I dont see anything in your post, Lee...

"this" is the link.

Posted
Not even the hyperlink?

 

Nope... Maybe try messaging me the link?

Posted
"this" is the link.

 

HA!! I couldn't see the difference in color. I am color blind so that may have contributed.. It's OK, I will live. I just will never be able to fly a commercial airliner... *sigh* :(

Posted
Maybe this will help you?

 

Lee, great program, but I want to be able to have the routine create a NEW drawing and paste the objects there. Does your routine do that? Am I overlooking something there?

 

Thanks

Posted
Lee, great program, but I want to be able to have the routine create a NEW drawing and paste the objects there. Does your routine do that? Am I overlooking something there?

 

Cheers :)

 

Indeed, my program doesn't create a new drawing, but will interface with an arbitrary drawing to which it will copy the selection of objects; hence, I thought you may be able to use the same method to interface with your new drawing, copying the required objects.

Posted
Cheers :)

 

Indeed, my program doesn't create a new drawing, but will interface with an arbitrary drawing to which it will copy the selection of objects; hence, I thought you may be able to use the same method to interface with your new drawing, copying the required objects.

 

I cant seem to figure it out. You mention "deep clone", is this how you are able to start a routine in one drawing, and transfer info to another drawing? That is my hiccup. I can't figure out how to start a code in drawing1, and finish it in drawing2...

Posted

"Deep Cloning" refers to the CopyObjects method used by the program to copy objects between drawing databases.

 

I envisaged you add a new Document Object to the Documents Collection via the Add method, then using CopyObjects to copy drawing objects to the drawing database of the new Document Object.

 

I'll see if I can put an example together if I have time.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...