Arnie Posted November 15, 2011 Posted November 15, 2011 (edited) Hi everyone. I've been breaking my head trying to get the DWG created from solidworks positioned correctly onto model space . Every time the dwg is created it brings the first page (layout) into model space and the reamaining into paper space. I'd like to know if there is a way (lisp or VBA) to import the drawing from paperspace into model space and position it correctly within its own paperspace. To make things harder the number of pages varies constantly, some sort of imput would be required. I've attached the file created from solidworks as an example. Any help will be very much appreciated. Arnie A5.DWG Edited November 16, 2011 by Arnie Quote
ReMark Posted November 15, 2011 Posted November 15, 2011 Well first of all your title block and border belong over in your layout. What were you planning to do with your dimensions? Were you going to leave them in model space? If so, wouldn't they have to be annotative? Quote
Arnie Posted November 15, 2011 Author Posted November 15, 2011 Well first of all your title block and border belong over in your layout. What were you planning to do with your dimensions? Were you going to leave them in model space? If so, wouldn't they have to be annotative? Hi Mark. Thanks for your reply. The dwg is created from solidworks and is quite funny how it creates them ( as you could see from the attached file). All I'm trying to do is to copy and paste it from paperspace to modelspace as it is and only then position it within its own lay-out. The dims would stay as it is as solidworks creates a single dim style to every different dim scale. It would be great if it could be altered altogether (annotative, position), however I believe it would also be a pain to set this up all in one go, so I'd be happy to have the position sorted out... I'm having to do one by one and it's taking forever . Much appreciated Arnie Quote
ReMark Posted November 15, 2011 Posted November 15, 2011 There is no sense using a layout then if you are going to keep everything over in model space. Quote
Arnie Posted November 15, 2011 Author Posted November 15, 2011 Thanks again I do agree with you, however I don't make the rules where I work!I can tell that would be easier for me to make this thing happen than actually get my manager to agree with that... Would you be able to help me out with ''importing'' from paperspace to model space (in one hit) with different numbers of pages ? Thanks very muck. Arnie Quote
ReMark Posted November 15, 2011 Posted November 15, 2011 Arnie: From what I see on my screen there is nothing in your paper space layout but some named tabs. Everything, including the title block and border is over in model space. What am I missing here? I now know what I missed. I did a Zoom > Extents in one of the tabbed layouts. Only then did I discover another whole drawing the size of a small elephant. I was blind but now I can see. So it appears that for each of the six layout tabs, if one were doing this the hard way, the objects that belong over in model space would have to be cut out of the layout and inserted in model space. Then the user would have to set up the proper view for each layout. I think I've got it now. At least I think I do. There's no way to go from Solidworks right into model space? Quote
Arnie Posted November 15, 2011 Author Posted November 15, 2011 hehe. That's solidworks for you mate... sorry about that ,i should have mentioned or explained better. cheers Quote
ReMark Posted November 15, 2011 Posted November 15, 2011 Thanks againI do agree with you, however I don't make the rules where I work!I can tell that would be easier for me to make this thing happen than actually get my manager to agree with that... Would you be able to help me out with ''importing'' from paperspace to model space (in one hit) with different numbers of pages ? Thanks very muck. Arnie Can't think of a way at the moment. Sorry. What sheet size will you be using? Nevermind. (hint: A3) Quote
Arnie Posted November 15, 2011 Author Posted November 15, 2011 Thanks mate. Appreciate the effort.Arnie Quote
Arnie Posted November 15, 2011 Author Posted November 15, 2011 Hey , I missed this one... Solidworks is pretty useless when it comes to export to DWG. It is pretty mess-up. I'd thought there would be a way but I'be been trying for ages to find this way and apparently I'm not the only one. As it stands there is no way...Cheers Quote
ReMark Posted November 15, 2011 Posted November 15, 2011 There has to be a way to do this. I'll give it some more thought. Quote
LibertyOne Posted November 16, 2011 Posted November 16, 2011 Thanks againI do agree with you, however I don't make the rules where I work!I can tell that would be easier for me to make this thing happen than actually get my manager to agree with that... Would you be able to help me out with ''importing'' from paperspace to model space (in one hit) with different numbers of pages ? Thanks very muck. Arnie I feel a bit of irony here. Has your manger calculated the cost savings there would be if the one rule were changed instead of you trying to program a solution? I've seen this so often in the course of my career. The boss wants something done in a specific way and then the workers have to jump through hoops of fire to get it done because you don't have the right tool for the job. "Hey, Jim, I need you to get these nails hammered in by the end of the day, but all we got for tools is a screwdriver and a half inch wrench. I'm sure you'll figure out a way to do it." Now I'm not bad-mouthing anyone, just putting out some constuctive criticism. The 3D design programs like Inventor, SolidWorks and Catia have a totally different design philosophy than the 2D drafting board programs like AutoCAD and MicroStation. Plotting designs from the 3D programs on paper is one thing, data being converted from one system to the other is another. Now I'm not sure from where these DWGs out of SolidWorks are coming. From your company? From an external company? And why you need to process the data and format it in such a complicated way. Are you going to reuse the files for something else? Quote
LibertyOne Posted November 16, 2011 Posted November 16, 2011 Arnie, I looked at the drawing you attached earlier in this thread. You still haven't explianed what your ultimate goal is. I see that you have 7 sheets that are on their own tabs (one model space and six paper space) and you said that this varies in number. If you want to put everything in model space, you should rescale everything 1:1 (details left alone). Without killing the dimscale, I would recommend creating a block out of all the entites (including the sheet border) and then scaling the block down to 1:1. Of course you will have different sheet sizes due to the different scales, but if all sheet sizes are A3 anyway this makes no difference. My question is do you still want every sheet in the same file (multiple sheets in paper space)? Or would it be wise to write out each sheet to a new file which would be found in model space scaled 1:1? For placement the latter would be better. Each file could be given a sequencial name (Test_01.dwg, Test_02.dwg, Test_03.dwg, etc.) numbered by sheet. But not know what your goal is, I could be running down the wrong path... I'm willing to help...just need more info to do so... Quote
Arnie Posted November 16, 2011 Author Posted November 16, 2011 Hey mate. You've nailed it on the head... The DWG's is usd to send our drawings out to sub-contractors. So they can open the drawing and take whatever they wnat from them. Cheers Quote
Arnie Posted November 16, 2011 Author Posted November 16, 2011 ''Or would it be wise to write out each sheet to a new file which would be found in model space scaled 1:1? For placement the latter would be better. Each file could be given a sequential name (Test_01.dwg, Test_02.dwg, Test_03.dwg, etc.) numbered by sheet.'' The ultimate goal is to copy(cut) whatever is on the paper space and paste it on mode space with some sort of lisp or macro . Some of the drawings are 20/30 pages long. Imagine having to copy and paste every single one, one by one . It takes forever ... The drawing on paper space can definitely be deleted . Thanks Arnie Quote
LibertyOne Posted November 16, 2011 Posted November 16, 2011 Hey mate. You've nailed it on the head... The DWG's is usd to send our drawings out to sub-contractors. So they can open the drawing and take whatever they wnat from them. Cheers WOW! So you're like designing stuff and giving away the designs? Why not send out in PDF? Or do the subs use the DWG for CNC work? I guess cleaning that up for them needs to be done - and if you ask me, I'd go the path of writing out each sheet to a seperate file and have it scaled 1:1 in model space. Any takers out there in the forum to do the programming? Quote
Arnie Posted November 16, 2011 Author Posted November 16, 2011 The dwg's are not only used in CNC, but also in other different ways.PDF's are also used depending on ''whom'' the drawing will be sent to.Most of our sub's don't have solidworks. Your idea sounds perfect. Thanks a lot.Arnie Quote
LibertyOne Posted November 16, 2011 Posted November 16, 2011 ''Or would it be wise to write out each sheet to a new file which would be found in model space scaled 1:1? For placement the latter would be better. Each file could be given a sequential name (Test_01.dwg, Test_02.dwg, Test_03.dwg, etc.) numbered by sheet.'' The ultimate goal is to copy(cut) whatever is on the paper space and paste it on mode space with some sort of lisp or macro . Some of the drawings are 20/30 pages long. Imagine having to copy and paste every single one, one by one . It takes forever ... The drawing on paper space can definitely be deleted . Thanks Arnie It would take me a while to program this and I have very little time, BUT for starters here's how I would go about doing this: 1.) Open dwg file and count number of tags including the model space tag. 2.) For each tag get the scale of the drawing (variable dimscale may help find this) 3.) For each tag get the name of the tag 4.) For each tag get the sheet number 5.) WBLOCK all entities in each tag, scale to 1:1, file name written as FILENAME_SHEET#.dwg It wouldn't matter if the file had 3 or 300 tabs, it would just cycle through doing these steps. Hope someone here may see this as a challenge and has time to programm something. Quote
Arnie Posted November 16, 2011 Author Posted November 16, 2011 Top man Thanks so much for your help. Arnie Quote
LibertyOne Posted November 17, 2011 Posted November 17, 2011 I put some more thought into this on the way home from work yesterday. If you, or mainly your manager, would settle for writing out the sheets to seperate files I'd like to take a crack at this. I also found out yesterday that DIMSCALE isn't the right system variable for the scale. DIMLFAC is. Only problem for me at the moment is I have very little access to a machine running AutoCAD. I have no way of testing what I write. 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.