JPlanera Posted October 18, 2011 Posted October 18, 2011 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??? Quote
JPlanera Posted October 19, 2011 Author Posted October 19, 2011 I dont see anything in your post, Lee... Quote
Lee Mac Posted October 19, 2011 Posted October 19, 2011 I dont see anything in your post, Lee... Not even the hyperlink? Quote
Ollie8974 Posted October 19, 2011 Posted October 19, 2011 I dont see anything in your post, Lee... "this" is the link. Quote
JPlanera Posted October 19, 2011 Author Posted October 19, 2011 Not even the hyperlink? Nope... Maybe try messaging me the link? Quote
JPlanera Posted October 19, 2011 Author Posted October 19, 2011 "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* Quote
JPlanera Posted October 19, 2011 Author Posted October 19, 2011 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 Quote
Lee Mac Posted October 19, 2011 Posted October 19, 2011 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. Quote
JPlanera Posted October 19, 2011 Author Posted October 19, 2011 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... Quote
Lee Mac Posted October 19, 2011 Posted October 19, 2011 "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. Quote
Recommended Posts
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.