.NET

Reply
Active Member
ajoshi1967
Posts: 9
Registered: ‎09-30-2010
Message 1 of 5 (531 Views)

AutoCad Script Files

531 Views, 4 Replies
10-01-2013 01:34 AM

I need Help on Following :

 

1. Is it possible to read excel files through script files.

 

2. Can I declare variables in script files.

 

 

Mentor
mzakiralam
Posts: 231
Registered: ‎11-09-2012
Message 2 of 5 (521 Views)

Re: AutoCad Script Files

10-01-2013 02:45 AM in reply to: ajoshi1967
Please mention clearly what do you want. Only then someone can help you.
Distinguished Mentor
gasty1001
Posts: 544
Registered: ‎04-11-2010
Message 3 of 5 (500 Views)

Re: AutoCad Script Files

10-01-2013 11:12 AM in reply to: ajoshi1967

Hi,

 

If by script you mean AutoCAd .scr files, the short answer is NO, scripts are just a list of AutoCAd commands that execute almost unconditionally (there is no if ..then else, goto, or things alike)  and with some limitations, but scipts can call AutoLISP code or a VBA macro to execute, and both can access excel files.

 

Gaston Nunez

Active Member
ajoshi1967
Posts: 9
Registered: ‎09-30-2010
Message 4 of 5 (484 Views)

Re: AutoCad Script Files

10-01-2013 07:00 PM in reply to: gasty1001
Thanks a lot Mr. Nunez.
This exactly what I wanted. I have a full fledge program in Autocad VBA. Different offices of our company uses different version of Autocad. So we want have a programming tool which will be independent of version of Autocad. Do you think script files can be better choice.

Can you send me sample code script file which can access vba code
Distinguished Mentor
gasty1001
Posts: 544
Registered: ‎04-11-2010
Message 5 of 5 (479 Views)

Re: AutoCad Script Files

10-01-2013 08:34 PM in reply to: ajoshi1967

Hi,

 

It's just a line in a text file, put this line : -vbarun SomeAutoCADVBAMacro in a txt file with scr extension and voila.

 

Gaston Nunez

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.