Get rid of those blipmodes

Discussion in 'AutoCAD' started by cadman_meg, Mar 2, 2004.

  1. cadman_meg

    cadman_meg Guest

    I have several routines that I got from various different sources and for some reason, people still like to use blipmodes. Personally, I hate them. Is there a way to stop all of these routines from setting them "on" and then not "off". I mean, some of them have good coding and does switch the variable back, but then if you cancel out of the routine it doesn't do so. I know I could create a button or accelerator macro that would do the trick and I could just hit that once in a while, but I would like to see something that does so automatically or something. Ideas out there? Thanks for any and all help.
     
    cadman_meg, Mar 2, 2004
    #1
  2. cadman_meg

    dean_bourke Guest

    Take the line out that sets them on ?

    dean
     
    dean_bourke, Mar 2, 2004
    #2
  3. cadman_meg

    cadman_meg Guest

    But then I would have to go through everyone of them. On top of this, some of these routines are .vlx files or .fas files that I can not edit. So do not think that would be feasible.
     
    cadman_meg, Mar 2, 2004
    #3
  4. cadman_meg

    Jeff Mishler Guest

    You could use a VBA 'reactor' to catch calls that change the "blipmode"
    variable. If it is changed to 1, set it back to 0.....

    If you have an "acad.dvb" then add the code below to "ThisDrawing", else
    start a new VBA project via the "vbaman" and place this code into the
    "ThisDrawing" section.

    'the next line must be in the Declarartions, ie prior to any subs or
    functions
    Public WithEvents ACADApp As AcadApplication

    'The following Sub is from the ACAD2002 Help files
    Sub Example_AcadApplication_Events()
    ' This example intializes the public variable (ACADApp) which will
    be used
    ' to intercept AcadApplication Events
    '
    ' The VBA WithEvents statement makes it possible to intercept an
    generic object
    ' with the events associated with that object.
    '
    ' Before you will be able to trigger any of the AcadApplication
    events,
    ' you will first need to run this procedure.

    ' We could get the application from the ThisDocument object, but
    that would
    ' require having a drawing open, so we grab it from the system.
    Set ACADApp = GetObject(, "AutoCAD.Application")
    End Sub

    Private Sub ACADApp_SysVarChanged(ByVal SysvarName As String, ByVal
    newVal As Variant)
    If newVal = 1 Then ThisDrawing.SetVariable "BLIPMODE", 0
    End Sub

    Then save the file as "acad.dvb". If you don't already have an "acad.rx"
    file, create one in the support folder and inlcude this in the body:
    acadvba.arx

    Finally, add (vl-vbarun "Example_AcadApplication_Events") to your
    acaddoc.lsp.

    Now, no matter what, the blipmode will be 0.....

    HTH,
    Jeff

    some of these routines are .vlx files or .fas files that I can not edit.
    So do not think that would be feasible.
     
    Jeff Mishler, Mar 3, 2004
    #4
  5. cadman_meg

    ECCAD Guest

    cadman,
    I use search & replace - funduc.com, fairly inexpensive and blazes through .lsp files very fast. For the .vlx, I dought that they would even deal with Blipmode.
    I did about 2500 .lsp in less than 20 seconds, to turn off CMDECHO.

    Bob
     
    ECCAD, Mar 3, 2004
    #5
  6. Hi,

    One approach would be to do a search and replace in the menu files.

    Replace ^C^C with ^C^Cblipmode;off;

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au

    of these routines are .vlx files or .fas files that I can not edit. So do
    not think that would be feasible.
     
    Laurie Comerford, Mar 3, 2004
    #6
  7. cadman_meg

    Walt Engle Guest

    Yes - use an acad.lsp for startup. I can email you this but I would need to know what font you want, if you want decimal or architectural dimensioning; if you want dimension text to have a color other than white; precision for dimension (1, 2 or 3 places, etc.);
    Let me know and I will send this to you. I can also add you name to it if you want.
    W. Engle
     
    Walt Engle, Mar 3, 2004
    #7
  8. cadman_meg

    cadman_meg Guest

    I think the VBA reactor would work best in my case. Will give it a try and let ya know the results. I understnad why folks use reactors, but personally, I think there are better things to do.
     
    cadman_meg, Mar 5, 2004
    #8
  9. cadman_meg

    cadman_meg Guest

    Jeff, or someone whom can help with this. I liked the idea of using a reactor type vba routine to rid these blipmodes, but for some reason it is not working. I ran a routine that I know causes them, and the vba didn't reate to it and switch it back off. I could this:

    Private Sub ACADApp_SysVarChanged(ByVal SysvarName As String, ByVal
    newVal As Variant)
    If newVal = 1 Then ThisDrawing.SetVariable "BLIPMODE", 0
    End Sub

    just like it says in a new module, then saved it as blipmode.dvb and set it up in the startup suite. I also added an rx file with this:

    acadvba.arx

    in it and saved it in the support directory. So it seems all should work. Can you or someone help with this? Thanks.
     
    cadman_meg, Mar 5, 2004
    #9
  10. cadman_meg

    Jeff Mishler Guest

    You didn't mention that you did the fianl piece of the puzzle:
    Finally, add (vl-vbarun "Example_AcadApplication_Events") to your
    acaddoc.lsp.

    Nor did you say you placed the other sub in the dvb,
    "Example_AcadApplication_Events"

    VBA doesn't capture an event unless that sub is included AND executed
    (per the documentation included with that example) .....

    Jeff

    reactor type vba routine to rid these blipmodes, but for some reason it
    is not working. I ran a routine that I know causes them, and the vba
    didn't reate to it and switch it back off. I could this:
    set it up in the startup suite. I also added an rx file with this:
    work. Can you or someone help with this? Thanks.
     
    Jeff Mishler, Mar 5, 2004
    #10
  11. cadman_meg

    Doug Broad Guest

    1) You need to check the sysvariable to see if blipmode is firing it.
    2) The general structure is:
    'ACAD.DVB Project -------------------

    'EventClass Class Module -------------------
    Public WithEvents doc As AcadDocument
    Public WithEvents acadapp As AcadApplication

    Private Sub acadapp_SysVarChanged(ByVal SysvarName As String, ByVal newVal As Variant)
    If SysvarName = "BLIPMODE" And newVal = 1 Then doc.SetVariable "blipmode", 0
    End Sub

    'End EventClass Module-----------//

    'Module1---------------------------
    Dim ec As New EventClass


    Sub initevent()

    Set ec.acadapp = ThisDrawing.Application
    Set ec.doc = ThisDrawing

    End Sub

    Sub acadstartup()
    Call initevent

    End Sub

    'end module1 ------------------//

    'end ACAD.DVB //


    some reason it is not working. I ran a routine that I know causes them, and the vba didn't reate to it and switch it back off. I
    could this:
     
    Doug Broad, Mar 5, 2004
    #11
  12. cadman_meg

    cadman_meg Guest

    Not the best with VBA. In fact, sometimes, I am completely ignoran with regards to that. I am trying though. I tried Jeff's way and put (vl-vbarun "Example_AcadApplication_Events") in my acad.lsp. But I could not figure where to put:

    Sub Example_AcadApplication_Events()

    What I have of Jeff's right now in my vba project is:

    Private Sub ACADApp_SysVarChanged(ByVal SysvarName As String, ByVal
    newVal As Variant)
    If newVal = 1 Then ThisDrawing.SetVariable "BLIPMODE", 0
    End Sub

    So where do I go to put the "sub"?

    Then I also tried the other guys way by adding all of this:

    'EventClass Class Module -------------------
    Public WithEvents doc As AcadDocument
    Public WithEvents acadapp As AcadApplication

    Private Sub acadapp_SysVarChanged(ByVal SysvarName As String, ByVal newVal As Variant)
    If SysvarName = "BLIPMODE" And newVal = 1 Then doc.SetVariable "blipmode", 0
    End Sub

    'End EventClass Module-----------//

    'Module1---------------------------
    Dim ec As New EventClass


    Sub initevent()

    Set ec.acadapp = ThisDrawing.Application
    Set ec.doc = ThisDrawing

    End Sub

    Sub acadstartup()
    Call initevent

    End Sub

    'end module1 ------------------//

    'end ACAD.DVB //

    But this did not work. I got to tell you, I am learning here and I appreciate that, but I can't seem to piece this together. I have in the past created a complete vba project that detects when a text or attribute command or editing happens and automatically toggles the caps lock on and off. That one took me some time. So if you could maybe please tell me exactly where and how this goes in I would appreciate it. Thanks so much for the help.
     
    cadman_meg, Mar 5, 2004
    #12
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.