martan1912 Posted January 22, 2014 Posted January 22, 2014 Hello, I've tried many pointers from google search, but none of them seem to work. I'd like to add a custom button to my toolbar to open a specific Excel file from autocad interface. I'm using AutoCAD 2014. Anyone using something like this? Thank you. Quote
steven-g Posted January 22, 2014 Posted January 22, 2014 You can add a hyperlink to an Autocad object that will open a file by holding Ctrl and clicking on the object, I have used that as a sort of drawing register, maybe a LISP could do that by selecting a toolbar item? Quote
martan1912 Posted January 22, 2014 Author Posted January 22, 2014 Thank you, hyperlink works, but it would be better to just have a custom button on the toolbar and having it as one click thing. I'll probably want to expand on functionality later on so that would be a better avenue to take. Quote
steven-g Posted January 22, 2014 Posted January 22, 2014 Maybe this would help http://www.cadtutor.net/forum/archive/index.php/t-77272.html Quote
Tuns Posted January 22, 2014 Posted January 22, 2014 Why wouldn't you simply open up the excel file? Quote
martan1912 Posted January 22, 2014 Author Posted January 22, 2014 Why wouldn't you simply open up the excel file? I guess because I'm lazy. I have Autocad screen maximized and I want to just click once from my workspace to open a specific file, instead of a few clicks doing it different way. What I'm ultimately after is a routine or a macro that would grab full content of a specific excel file and paste it into a second sheet of another specific excel file (template). But, this is a start. Quote
MSasu Posted January 22, 2014 Posted January 22, 2014 By an AutoLISP statement; should adjust it to your paths: (startapp "\"C:\\Program Files\\Microsoft Office\\Excel\" \"C:\\My Worksheets\\Test.xls\"") Quote
martan1912 Posted January 22, 2014 Author Posted January 22, 2014 By an AutoLISP statement; should adjust it to your paths: (startapp "\"C:\\Program Files\\Microsoft Office\\Excel\" \"C:\\My Worksheets\\Test.xls\"") Hi, it's not working, autocad command line returns (startapp " That's all. Quote
Mike_Taylor Posted January 22, 2014 Posted January 22, 2014 Try this forum, LeeMac cam up with a pretty slick macro. Quote
martan1912 Posted January 22, 2014 Author Posted January 22, 2014 Try this forum, LeeMac cam up with a pretty slick macro. I've been there yesterday, none of that worked for me. BUT, after a lot of trial and error I got it to work with this: ^C^C(startapp "C:/Program Files (x86)/Microsoft Office/Office14/excel.exe" "S:/test.xlsx") Thank you all for time and help. Quote
martan1912 Posted January 23, 2014 Author Posted January 23, 2014 What if I want to open this workbook in the specific sheet? I've tried to add #sheetname after xlsx file extension, but it's not working. Can this be done doing it the way I am ? 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.