copy to model space multi drawings

copy to model space multi drawings

muhamed_ragab92
Enthusiast Enthusiast
1,330 Views
12 Replies
Message 1 of 13

copy to model space multi drawings

muhamed_ragab92
Enthusiast
Enthusiast

Hello, kindly I want a lisp to copy all objects in paper space (layout) to model space in the same point 0,0,0 and scale factor 1, for several drawings 

another thing: if the lisp can run the script on the drawings in a specific path and save it in the same path without opening the drawings

Urgently your replies, please

0 Likes
Accepted solutions (1)
1,331 Views
12 Replies
Replies (12)
Message 2 of 13

paullimapa
Mentor
Mentor

so you want the exact copy of all objects (I assume you don’t want any pspace vports) in what particular named layout?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 13

ec-cad
Collaborator
Collaborator

Why the requirement to 'not' open the drawings ? That makes it much more complicated to do.

 

If you allow the drawings to be opened.. then

A simple Lisp can be loaded from any open drawing, that creates a script and runs it, something like..

A Windows shell with a dialog to "Select Folder" ..get a list of the dwg's there..

Then, with that list of drawings...

 

Foreach dwg dwglist

Open

(load "c:/lisp/lispfilename"); to do the changes

qsave

close

... then next

 

ECCAD

 

And, can we use 'CHGSPACE' command foreach layout, assuming you want 'all' layouts moved

to Model space ?

 

ECCAD

0 Likes
Message 4 of 13

Sea-Haven
Mentor
Mentor

CHSPACE maybe.

 

Unable to recognize command "CHGSPACE".

0 Likes
Message 5 of 13

muhamed_ragab92
Enthusiast
Enthusiast

What i mean in not open drawings it’s option like copy to drawing lisp of lee mac , okay not major request if the lisp select the file from the folder and copy the items from paper space to model and save will be perfect 

thanks alot for your support

0 Likes
Message 6 of 13

muhamed_ragab92
Enthusiast
Enthusiast

It’s for several drawings about 60 or may be 100 drawings , chspace request open each file one by one 

0 Likes
Message 7 of 13

paullimapa
Mentor
Mentor

Chspace actually moves the objects from paperspace to inside a vport and scales it using the vport’s scale. But sounds like your requirements are to NOT move all the objects but to make a copy. Is this correct?  And you don’t need to have a copy of the vport right? Also you want the copy to be at a scale of 1 right?  


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 8 of 13

muhamed_ragab92
Enthusiast
Enthusiast

No iam okay with move but chspace make me move the items for each drawing one by one i need to make it once by select path 

0 Likes
Message 9 of 13

paullimapa
Mentor
Mentor

share a sample of one of these dwgs for community to take a look at test code


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 10 of 13

paullimapa
Mentor
Mentor
Accepted solution

Try this lisp code & script which should work on drawings that actually have objects in a Layout. The lisp will let you select a folder where all the dwgs are located, then select the script that includes the chspace sequence of commands ending with a save. This is also run using AutoCAD CoreConsole so there's no need to manually open up each dwg. Give it a try and let me know if that works out for you.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 11 of 13

muhamed_ragab92
Enthusiast
Enthusiast

Thank you really appreciated it, you're a genius that's exactly I searched for it 

0 Likes
Message 12 of 13

ec-cad
Collaborator
Collaborator

Oops, that should be CHSPACE, my bad.

(:

ECCAD

0 Likes
Message 13 of 13

paullimapa
Mentor
Mentor

glad that worked out for you...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes