gmiani Posted October 23, 2009 Posted October 23, 2009 Ed - sorry to hear you're still having trouble. In an effort to debug this situation (thats working perfectly for me) and to help others out, I just want to run through you're setup to make sure we're on the same page. Are you datalinking this table and/or using "paste special - autocad entities"? Or doing the "paste special - excel" deal (which will create a different result)? Is your *.fmp file is showing up as an autocad icon? Meaning...it actually got changed from a notepad *.txt to a *.fmp extension. Have you double checked your "options" setting to make sure its directed to that font map file. Quote
EdCycler Posted October 23, 2009 Author Posted October 23, 2009 Are you datalinking this table and/or using "paste special - autocad entities"? Or doing the "paste special - excel" deal (which will create a different result)? paste special - autocad entities Is your *.fmp file is showing up as an autocad icon? Meaning...it actually got changed from a notepad *.txt to a *.fmp extension. My *.fmp file is showing up as an autocad icon Have you double checked your "options" setting to make sure its directed to that font map file. C:\Program Files\Autodesk\Acade 2009\Acade\acad.fmp Quote
tmreyes Posted January 18, 2010 Posted January 18, 2010 I am having trouble editing my table text in properties. We just changed to windows 2007 and this is when the issues came about. before the change i had no trouble changing the font of all cells, now i have to go into each individual cell to change the font. i can pretty much change everything else in properties except the font. And it only does this with table I bring from excel, I'm doing everything as usual but now we can't change the font with out having to go into each cell and changing it. i have tried going into the acad.fmp and doing the "orig. font; new font " thing but its not working. can someone plz help i have wasted days trying to figure this out. Quote
EdCycler Posted January 18, 2010 Author Posted January 18, 2010 This is exactly the problem I was having. I solved it using the VBA macro I found. I still use the VBA macro. See the comment above for the VBA macro. I think it is comment #18. Ed Quote
tmreyes Posted January 18, 2010 Posted January 18, 2010 ok i must be doing something wrong, i press F5 to run it and there is an error "Compile error: User-defined type not defined" and highlights "AcadApp As AutoCAD.AcadApplication' Am i doing something wrong? or do i need to put something else. Quote
EdCycler Posted January 18, 2010 Author Posted January 18, 2010 Under References, I have selected: -Visual Basic For Applications -AutoCAD 2009 Type Library -OLE Automation Quote
tmreyes Posted January 19, 2010 Posted January 19, 2010 i was able to fix the macro but I am still having the same problem with not being able to change the table font in properties. I was also able to change the acad.fmp file and it helps but i still need to be able to change font with out having to do it the long, and tedious way. Anymore ideas? I do appreciate the help! FYI, i have autocad 2008 if that helps any. Quote
EdCycler Posted January 19, 2010 Author Posted January 19, 2010 Technically, you do not change the table font, you change the table style. The macro removes all the hard-coded fonts attached by Excel. Type TABLESTYLE and change the font of the style of the table. Quote
tmreyes Posted January 19, 2010 Posted January 19, 2010 Yes I meant text style not font. I have made sure my styles are correct and my table styles are correct. and I still cannot change the text style in properties. I need to be able to change multiple cells at one time and now I can't anymore (through properties). Quote
EdCycler Posted January 19, 2010 Author Posted January 19, 2010 Let me step through what I do to change the font properties in an imported Excel spreadsheet: -Open Excel and copy the cells -open AutoCAD and paste special - autocad entities -check that the AutoCAD table text font in one cell is Calibri -Load project and run the FixTableText macro. -I get a Msg Box that says "All Table Text Fixed!" -check that the AutoCAD table text font in one cell is romans, or something -select several cells in the AutoCAD table -go to properties, select Text Style, and select another style Quote
tmreyes Posted January 21, 2010 Posted January 21, 2010 It worked thank you! :-) I was running the macro in excel instead of autocad! oops I did it slightly different though. i created the macro in autocad and ran it. the load project i dont know how to get that, meaning i dont know what file to pick or look for. am i missing a step? how do i create a *.dvb file that its looking for in the open VBA project window (that i get when clicking load project)? FYI, im not very proficient in macros/VBE/VBA etc. Quote
tmreyes Posted January 21, 2010 Posted January 21, 2010 ok i thought i figured it out with the VBA Manager, ACADProject. I went into VBA manager Clicked new (gives me ACADProject, GlobalX) Click ACADProject, GlobalX Then click Macros Created a macro Ran macro closed and returned to autocad clicked on ACADProject, GlobalX again clicked save as, named it i also saved that drawing I then open i new drawing so i can load project and it doesnt have the macro What am i doing wrong, or am i misunderstanding how VBA manager/projects/*.dvb files work? Quote
EdCycler Posted January 21, 2010 Author Posted January 21, 2010 I will not be back in the office until Monday and so I do not have AutoCAD available to advise you. I do remember that you have to save the macro separate from AutoCAD because you have to reload it each time you start AutoCAD. Quote
tmreyes Posted January 25, 2010 Posted January 25, 2010 ok so what i did was save a template wit the macro, and when ever i have that drawing open all more drawings will have the macro available to them. but i an issue came up. I work with cable and conduit schedules, and i have a column that has the conductors listed for each conduit. now i can have "10X #14 AWG XHHW; 1X #12 AWG XHHW G" listed in the cell and it will take out the first half when i run the macro and only end up with "1X #12 AWG XHHW G". Do you know whats going on with this. It seems like the semicolon is making it go away some how. cuz we can take out all the semicolons and replace it with a regular colon and run the macro and it works fine. Can this be a simple fix, like editing the macro? Quote
EdCycler Posted January 25, 2010 Author Posted January 25, 2010 Excel puts a semicolon into the cell. example: {\fCalibri|b0|i0|c0|p34;\C7;yourtext} The macro looks for the last semicolon in that whole expression and deletes from that point forward. You could add some code that changed that, like: Locate PPos = InStrRev(Celltext, ";") Change To PPos = InStrRev(Celltext, ";",25) ,25 sets the starting position for each search at 25 characters. You might want to vary this some depending on how long your text is. Quote
tmreyes Posted January 26, 2010 Posted January 26, 2010 thank you that worked. now to make sure I understand it will delete anything after 25 characters (to the left of the semicolon)? Is it significant to have either one of those codes in the macro? Quote
EdCycler Posted January 26, 2010 Author Posted January 26, 2010 It will start looking for the semicolon after 25 characters from the right. It will delete from the semicolon. The 25 was only a guess on my part and can be any number that works. Quote
tmreyes Posted January 27, 2010 Posted January 27, 2010 oh, ok i understand now. thank you for your help. one more question, can i just take code out or is it important to have it in there? Quote
EdCycler Posted January 27, 2010 Author Posted January 27, 2010 Every line of code is there for a reason. Take out the line and it will probably effect something. For example, if you remove: PPos = InStrRev(Celltext, ";") then the variable PPos will not be set by InStrRev(Celltext, ";") and will remain zero instead of some value and the complete cell text might be removed. 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.