×
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

ACADProject in VBA Editor

ACADProject in VBA Editor

ACADProject in VBA Editor

(OP)
When I load a dvb file it creates a new Project in the VBA Editor and the project name ends up being something like this:

ACADProject(C:\Path name to DVB file)

Initially I had a ACADProject(Global1) but it seems to be gone.  The reason I am describing this is because I am having a problem I think is related.  I tried to create a custom toolbar button that would load a Macro that I have in my Project Module.  I cannot get it to work.  When I look at the Macro in my Macro List, it is listed with a path back to the project DVB.  That is how I list the macro in my button properties but it does not work.  I also tried to just list the macro name but that does not work either.  Any suggestions or comments?

RE: ACADProject in VBA Editor

You can put your code into the acad.dvb project which automatically loads when AutoCAD is started. It should be located in you AutoCAD main directory.
Or you can create a acad.lsp file and have AutoCAD load your project on startup.  You need the following lines in the .lsp file:

(defun S::STARTUP()
(command "_VBALOAD" "gloabl2.dvb")
)

but your global2.dvb needs to be in the AutoCAD main directory to work.

RE: ACADProject in VBA Editor

You can also add the location of the project in the support file search path, point to location in autocad by using the startup suite. Then create a button and put this in it:
^C^C-VBARUN PROJECTNAME.DVB!PROJECTNAME

If you don't have a module in your project add one and put the following in it.

Public Sub BlockInsert()
FRMPROJECTNAME.Show
End Sub

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