+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1
    Full Member jwkilgore's Avatar
    Computer Details
    jwkilgore's Computer Details
    Operating System:
    Windows XP
    Using
    AutoCAD 2009
    Join Date
    May 2010
    Location
    Chattanooga, TN
    Posts
    29

    Question Excel to ACAD Table - Font question

    Registered forum members do not see this ad.

    We just upgraded to AutoCAD 2009 (from 2007) this week. We have a license subscription, but our primary client only recently upgraded to '08 and doesn't want files generated by any version newer than '09. I've learned to not ask why, just go with it.

    I was really excited about the ability to dynamically link Excel files into AutoCAD. I'm working on a project with over 1500 footings, requiring massive amounts of design data in many tables. I was dreading coordinating and checking all this using the old method of transferring Excel files into '07, mainly because the design criteria for the footings keep changing. Now I can just keep a couple of Excel files updated and I'm good to go. I've made a few practice runs and everything is looking good... except for the font. This client requires us to use a proprietary SHX font file in AutoCAD.

    The linked table reads the font style from Excel instead of the AutoCAD Table text style. Actually, it appears as if the font is encoded with the text data, something like "{\fCalibri|b0|i0|c0;TEXTHERE".

    If it were a standard Windows font I would just change the font in Excel and keep on going. I can unlock the cells and change each one individually (edit the text, change style), but 1500+ rows times 9 to 15 columns of data per row... that's some serious time. Plus each time the link is updated it overwrites the font changes. I've tried disconnecting the link (the final submitted CAD file won't be linked) which solves the overwrite problem, but still I can only edit one cell at a time. As of now, it looks like we'll just use TTF fonts until the very end then we'll detach the link and task a tech or two to sit there and blow through the table changing the font in every table. And then go through the tedious process of re-checking every cell in the table in case the value in one of the cells gets accidentally changed in the font change process.... ugg.

    In order to avoid that, does anyone know how to:
    1) Use AutoCAD to globally override the font that is included with the cell data in Excel;
    or
    2) Change it so either the font call is NOT embedded in the Excel cell value (or else change it so AutoCAD doesn't import this portion of the cell value);
    or
    3) Convince Excel to read and display an AutoCAD SHX font;
    or
    4) Convince a multi-billion dollar company that they need to change their standards so I can easily import tables into AutoCAD from Excel

    Thanks in advance!

  2. #2
    Senior Member
    Using
    AutoCAD 2015
    Join Date
    Sep 2010
    Location
    New Zealand
    Posts
    217

    Default

    Don't know if this will help as I don't use dynamic linking I usually use lisp for all this sort of thing

    If you are using the copy > paste special > paste Link > Autocad entities

    You can change the font by clicking on the text then right clicking on the text and goto properties - then goto 'text style'

    This will still be linked to the Excel file.

  3. #3
    Full Member jwkilgore's Avatar
    Computer Details
    jwkilgore's Computer Details
    Operating System:
    Windows XP
    Using
    AutoCAD 2009
    Join Date
    May 2010
    Location
    Chattanooga, TN
    Posts
    29

    Default

    Yes, but that requires changing every single cell one at a time... almost 20,000 of them. It actually goes fairly quickly. Double click to edit the upper left cell, click the Style drop down and re-pick the same style, and the text is fixed. Hit TAB, repeat with next cell. TAB-click-click-TAB-click-click... One finger on TAB and the mouse hovering over the drop-down. Hellooooo carpal tunnel.

    Unfortunately, when you re-load the data from the Excel file it re-sends the same cell data which includes the encoded font call, so everything you've done is undone in a few seconds.

    Right now the plan is to wait until the design is final in a few months and we're ready to submit the final ACAD files to the client. Then we'll detach the link, hand out a few ibuprofen tablets, change over all the cells, and send it.

    Hopefully, though, someone knows of a better way. I don't know LISP, but I've recently dusted off my old college programming skills and written several V-BASIC programs for Excel. Maybe I can write a macro to run through the table and strip off the extra info. I'll look into that this weekend.
    Last edited by jwkilgore; 18th Feb 2011 at 02:10 pm.

  4. #4
    Full Member jwkilgore's Avatar
    Computer Details
    jwkilgore's Computer Details
    Operating System:
    Windows XP
    Using
    AutoCAD 2009
    Join Date
    May 2010
    Location
    Chattanooga, TN
    Posts
    29

    Default

    Anyone else have any ideas? I never got the chance to check into VBasic, and it's not looking like I'm going to get the change.

  5. #5
    Junior Member
    Using
    Electrical 2010
    Join Date
    Feb 2010
    Posts
    14

    Default The Cure for embedded Excel fonts: StripMTEXT LISP routine

    JW, any luck?

    If not, try the StripMTEXT LISP routine here: http://forums.autodesk.com/t5/Visual...e/td-p/2673838

    This outstanding routine, which belongs in the AutoLISP Hall of Fame, both for its excellence in programming and excellence in documentation, will remove those obnoxious embedded formatting codes that ACAD should have removed on its own as part of the Paste Special operation.

    --> Shame on you, AutoDesk, for yet another example of sloppy, defective programming that wastes your users' time! <--

    Save the LISP routine, drag 'n' drop it on the open drawing, type SMT, click a border line on the table, and hit Enter twice. Poof! The embedded Excel formatting is gone and now you can apply an ACAD Table Style using any font you like.

    This also works on other objects with embedded formatting -- Mtext, Mleaders, Dimensions, and Multiline Attributes. Open the routine in a text editor to read all about it.

    Many thanks and kudos to authors Steve Doman and Joe Burke.

  6. #6
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Aug 2012
    Posts
    1

    Default

    Set all text in excel to system.

  7. #7
    Junior Member
    Using
    AutoCAD 2012
    Join Date
    Sep 2008
    Posts
    17

    Default

    Quote Originally Posted by ECONNER View Post
    Set all text in excel to system.
    That is the best suggestion I have read in a long time...mostly b/c it's simple and it works!

  8. #8
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Jan 2013
    Posts
    3

    Question How to set all text in excel to system?

    Quote Originally Posted by ECONNER View Post
    Set all text in excel to system.
    How to set all text in excel to system? What is the system font?

  9. #9
    Luminous Being
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    5,426

    Default

    Calibri is a True Type font just get a copy of it and add to your system\fonts, pretty sure 2009 used TTF.

    Calibri.jpg
    A man who never made mistakes never made anything

  10. #10
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Jan 2013
    Posts
    3

    Default I don't understand.

    Registered forum members do not see this ad.

    Quote Originally Posted by BIGAL View Post
    Calibri is a True Type font just get a copy of it and add to your system\fonts, pretty sure 2009 used TTF.

    Attachment 39441
    Thanks! But I still can't change all the text fonts to a shape font at one time in AutoCAD.

Similar Threads

  1. export a table from cad to excel
    By naserrishehri@yahoo.com in forum AutoCAD Drawing Management & Output
    Replies: 16
    Last Post: 21st Oct 2010, 12:35 pm
  2. Excel to CAD Table
    By d_sut in forum AutoCAD General
    Replies: 3
    Last Post: 26th Apr 2010, 08:55 pm
  3. Change text font in existing table
    By EdCycler in forum AutoCAD Beginners' Area
    Replies: 40
    Last Post: 14th Apr 2010, 08:07 pm
  4. Excel Data Links and ACAD Table Formatting
    By slimpickinz in forum AutoCAD Drawing Management & Output
    Replies: 1
    Last Post: 19th Nov 2009, 10:42 pm
  5. Changing font in table cells Vanilla ACAD 09
    By Hepcat in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 28th Aug 2008, 03:23 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts