Running dvb

Discussion in 'AutoCAD' started by bkvikas, Jun 22, 2004.

  1. bkvikas

    bkvikas Guest

    My Userform has some controls and attached code which I want to execute as and when I require in a new drawing file. Is it possible executing by giving a command, it does not have any macro (basic module).

    Help needed.
    Thanks.
     
    bkvikas, Jun 22, 2004
    #1
  2. bkvikas

    Joe Sutphin Guest

    It sounds like you want to execute your macro whenever you open a drawing?
    If so, put this code in the ThisDrawing module

    Dim WithEvents oAcad As AcadApplication


    Private Sub oAcad_BeginOpen(FileName As String)
    'UserForm1.Show or whatever your form is called goes here.
    End Sub

    Joe
    --

    and when I require in a new drawing file. Is it possible executing by
    giving a command, it does not have any macro (basic module).
     
    Joe Sutphin, Jun 22, 2004
    #2
  3. bkvikas

    MP Guest

    I could be wrong but I think you need at minimum a macro which calls
    form.show
    include a module, create a sub Sub CommandName() Formx.show end sub
    then you can create a command to call that with a lisp call via vla-runmacro
    or vl-vbarun

    and when I require in a new drawing file. Is it possible executing by
    giving a command, it does not have any macro (basic module).
     
    MP, Jun 22, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.