Jump to content
jobube

Excel to DXF(dwg)

Recommended Posts

jobube

Hi all,

 

I'am new here so sorry if i put this in wrong topic.

 

I need help with some work. 

 

I have excel table with X and Y dimensions of 6000 parts with different text on  each part.  So now i would like to link excel file  to AutoCad or SolidWorks to get dwg or dxf from it in one go?

Is it possible and if so can you help me?

Share this post


Link to post
Share on other sites
CyberAngel

Are these 6000 parts all the same part? Are they all oriented the same way? If not, does the spreadsheet contain the angle for each part?

 

I don't know exactly how you would do this. Some versions import points from a spreadsheet. With a little programming, you may be able to insert blocks at the locations you specify with an attribute that contains the proper text.

Share this post


Link to post
Share on other sites
jobube

CyberAngel 1st thanks for reply.

They are not same part. But they look alike. They are oriented the same way. They are like 18*150  with text on them. Small text like 6-7 words. 

Share this post


Link to post
Share on other sites
BIGAL

Admin probably move to Lisp area etc

 

You need to explain a bit more what it is you are exactly trying to achieve is it to create a single dwg, insert a block, or amend existing dwgs. 

 

There is lots of stuff out there about Excel <-> Autocad its a case of generally what is to happen on the Autocad side.

Share this post


Link to post
Share on other sites
jobube

Thx for reply,

 

I need to make single dwg or dxf for each part. Simple Example: Board 17x125mm with Text on it.. 6-7 Words.  I have like 2200 parts all with same size 17x125 mm and every single one has a different text. 

So i want to link text from excel with autocad to get each dwg or dxf file for each different part. So i can use em for CNC procesing. 


I still have more parts to do but with different size.. (19x150mm, 25x100 mm..) and every single part have different text. 

Total job is like :

2200 parts 17x125 mm with different texts

1500 parts 19x150 mm with different texts

1000 parts 25x100 mm with different texts

1300 parts all different size and  with different texts

 

Share this post


Link to post
Share on other sites
maratovich

1. Attach the sample files.
2. Is this a one-time job?
3. I think this is just the beginning.
4. It may be necessary to continue with a different style and other parameters of the test, location, and more ...

Share this post


Link to post
Share on other sites
steven-g

Looking at your pdf it shows the text in different positions/groups sometimes split up in two lines, and at different distances and heights. How do you know from the excel information how this translates to the layout on the labels. I see the plate size in excel but no identification as to how the text in column "F" is divided and placed onto the labels. The excel list and pdf are also not the same items. A dwg showing the results from the excel list might make it clearer. Or a break down of how the information in excel translates to the placement in dwg.

Share this post


Link to post
Share on other sites
jobube

Hi, thx for reply.

 

Yes the pdf and excel are not same parts. Pdf is exemple as i told you on previous post. 

 

For excel parts text must be on center of the board..

 

Sorry if i missinform you.

Share this post


Link to post
Share on other sites
steven-g

Not misinformation but as an example is the first item in the excel sheet, in column "f" which reads "Butterfly valve LUG ND250 PN10 SM Fig.711901 - EL-PNE ACT MVS190"

Is that what needs placing on the labels or is it just "EL-PNE ACT MVS190" or something else. And does that text start at 15mm from the edge and is 10mm high. Because at 10mm high "EL-PNE ACT MVS190" in standard text would be about 140mm wide and won't fit.

Share this post


Link to post
Share on other sites
jobube

Name of plate is under:

 

"NamePlateDesc"

 

 

Text need to be centered on plate. No need for spacing from edge

 

Share this post


Link to post
Share on other sites
BIGAL

Looking at the pdf and the excel there does not seem to be any real link between the two, the excel does not have a key to link the plate style.

 

Need a dwg with the correct xls, so can try to work out whats going on. 

Share this post


Link to post
Share on other sites
steven-g

 

To use the example select the yellow colored cells in excel and press Crt+c then in Autocad make the command line active by clicking on it and make sure the cursor is blinking inside the command line or this won't work, then press Ctrl+v. Below is a description of what's going on.

 

 

Heres an example of using excel directly to create the files, you will notice a few "helper" formulas to split some of the earlier cells into useful data, ie. the width and height of the plates, and another formula to work out the height of the text based on the number of characters in the text item itself. The text command is a bit of an oddity when you are using it from excel so you need to split the input data up so there are lines in between to get the formulas to work properly, I'd use VBA to do that but it's fairly quick just to insert 2 lines each time, or do a search for adding blank lines between data rows on google there are a few simple tricks for doing that.

Then the three formulas in column "N" starting at row 4 the first one is used to empty the drawing area, draw a rectangle and use the same measurements to place text at the center of the rectangle, it needs a new row to finish the text command properly, and the second and third formula's now save the drawing using the text in column A as a drawing name.

 

The first 2 rows set up a folder where all your drawings will be saved to, so change that to suit (filedia=0 is needed to stop any prompts for filenames, and this is reset at the very last row). So if you use this make sure that is moved to the last cell.

 

I only did the first four items, I'll leave it to you split the rest of the data and copy/paste the formulas, The helper formulas should cover most size of box but just be aware that if you get beyond 2 or 3 figure numbers it will need adapting (or if you use decimal places).

02.448.430DALJINSKI ventili-natpisne plocice.xlsx

Share this post


Link to post
Share on other sites
BIGAL

Nice Steven-g had a quick look but still a big job if the end result is to do all the dims.

 

One gotcha the text style needs to have height set to 0.0 say "Standard", the dwg brg mine is set to north up so text appears 90. Changed both works now.

 

Still think its a pay for sort of job just bring in the range from excel so can do multiple items per sheet. 

 

Again needs a style column, single panel, double row text, there is about 6 styles in the pdf. Dynamic blocks come to mind as that removes the need for lots of coding.

 

Makes sense maybe a tick a box approach is the part required.

Edited by BIGAL

Share this post


Link to post
Share on other sites
steven-g

Hi Bigal

Definitely only an example, and does need changing for things like text style, but if you have 6000 of these to do, it's worth spending a few hours on coding to get it all sorted. I do similar things for customers who have repetitive work, purely in VBA, the VBA writes out a script file which is easier than all those formulas and formatting. Then all you need do is press a button in Autocad and watch it churn out drawings.

Share this post


Link to post
Share on other sites
jobube

Hi,

 

Thx a lot for example. I will try my best to apply this for my work. 

Will give back the info after I try it!

Thx once more!

Share this post


Link to post
Share on other sites
BIGAL

Hi Steven-g going down the vba to script makes a lot of sense same with a lisp <-> excel.

 

Jojube had a bit more of a think have you looked at using blocks this way all the dims are filled in but again your excel must say which block to use, then like steven-g you could have a macro that writes the correct info depending on the block type.

 

 

Share this post


Link to post
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...