×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Problem with vba, dvb in Autocad

Problem with vba, dvb in Autocad

Problem with vba, dvb in Autocad

(OP)
Hi, i've a problem in Autocad vba.
Hope someone can help me.
Here is what i d like to do.
I need to write a macro in order to open all *.dwg in a directory, after to put object in view top and to save and close files. Really simple in apparence but i only know vba in excel....

Thanks a lot

RE: Problem with vba, dvb in Autocad

Hi,

which AC version are you running?
I would write a script, download "Script Pro" and run...

Lothar


ADT 2004
ACAD 2002

RE: Problem with vba, dvb in Autocad

(OP)
Hi thanks i m using Autocad 2000i
Thanks for ur help

RE: Problem with vba, dvb in Autocad

(OP)
But i can use another Autocad if necessary.
Thank u

Bye

RE: Problem with vba, dvb in Autocad

loul69,

CODE

_tilemode
1
_-view
_top
_qsave
_close

Is this ok? put the text in an editor ->save as Name.scr -> open ACAD -> command "_script"
That's for one file...

Lothar

ADT 2004
ACAD 2002

RE: Problem with vba, dvb in Autocad

(OP)
Yes it s really great thank u, but my biggest problem is that i have many files. Is there a way to do a loop on each part???

Thanks a lot

RE: Problem with vba, dvb in Autocad

Hey,

I have posted a link:
http://usa.autodesk.com/adsk/servlet/item?siteID=123112&;id=4091678&linkID=2475161
SKRIPTPRO
I think it will run with 2000i.

Quote:


...3. ScriptPro takes AutoCAD scripting to a new level with an easy-to-use interface, logging, reusable project files, enhanced scripting with new keywords and utilities, and robust error recovery. Using ScriptPro, you can apply a set of commands to multiple drawings by simply specifying a script file and the list of drawings that you would like to apply the script to. ...

Lothar

ADT 2004
ACAD 2002

RE: Problem with vba, dvb in Autocad

(OP)
Allas no, it won t work with acad 2000i.....don t u have an idea in vba or in lisp???
Thanks really for ur help

RE: Problem with vba, dvb in Autocad

If you know VBA, you might be able to learn how to solve your "macro" problem by viewing examples of other people's code.

http://www.activedwg.com/html/VBA.htm has some examples that I have found helpful.

Good luck!

M.

RE: Problem with vba, dvb in Autocad

This is somewhat like a routine I use, it can fill a list box with files and then you just go line by line in the list to process each drawing..

http://www.ostrosoft.com/vb/projects/FindFileByExt/index.asp

"Everybody is ignorant, only on different subjects." — Will Rogers

RE: Problem with vba, dvb in Autocad

(OP)
Thanks a lot

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources