100% CPU USED

Discussion in 'AutoCAD' started by viniciusmbo, Aug 18, 2004.

  1. viniciusmbo

    viniciusmbo Guest

    I'm a beginner in AutoCAD VBA use, but I noticed a problem when I open teh Visual Basic Editor.

    When I open it and look in the task manager the process ACAD.EXE uses 99% of CPU. Even if i close the Editor it remains at 99%.

    Is it normal? There is anything that I should do to solve this problem.

    I´am using

    AutoCAD 2005
    Windows XP SP1
    Athlon XP Barton 2600
    512 MB RAM
    Video Ati RADEON 9200
     
    viniciusmbo, Aug 18, 2004
    #1
  2. viniciusmbo

    viniciusmbo Guest

    If I do the same in AutoCAD 2002,
    there is no problem.
     
    viniciusmbo, Aug 18, 2004
    #2
  3. Known problem. Will likely be fixed in the future.

    --
    R. Robert Bell


    If I do the same in AutoCAD 2002,
    there is no problem.
     
    R. Robert Bell, Aug 18, 2004
    #3
  4. viniciusmbo

    viniciusmbo Guest

    Thank You!
     
    viniciusmbo, Aug 18, 2004
    #4
  5. viniciusmbo

    Dave Guest

    See this thread:
    Temporary fix for 100% processer useage with VBA applications

    autodesk.autocad.2005

    Friday, May 28, 2004 8:12 AM


    --
    David Wishengrad
    President & CTO
    MillLister, Inc.
    Software for BOM, measuring, stretching and controlling visibility of
    multiple 3D solids.
    Http://Construction3D.com
     
    Dave, Aug 18, 2004
    #5
  6. viniciusmbo

    Ben Rand Guest

    This problem occurs when either the View toolbar and/or the 3D Orbit
    toolbars are open and you use a VBA app. If you look at the View name list
    box, you'll see it flickering very quickly, as though Acad is constantly
    scanning the drawing for a named view.

    The workaround is to throw a named view into the drawing, even if it's just
    a garbage view name. I found that you need to setup a named view in both
    ModelSpace and PaperSpace, and the problem goes away.

    I also added some VBA code that runs each time a drawing is opened to
    automate the process. The code below could be tweaked to be a little more
    bullet proof, but it got what I needed done. Note: according to the Help
    file, the .LayoutID property is Read-Only, but somehow the section that
    assigns the PS layout ID to the view layout ID worked.

    Public Sub AddJunkViews()
    Dim vw as AcadView
    Dim bPSView as Boolean
    On Error Resume Next
    'ModelSpace view
    Set vw = ThisDrawing.Views(0)
    If vw Is Nothing Then
    Set vw = ThisDrawing.Views.Add("JUNK_MS")
    End If

    For Each vw In ThisDrawing.Views
    If vw.LayoutId = ThisDrawing.Layouts(0).ObjectID Then
    bPSView = True
    Exit For
    End If
    Next vw

    On Error GoTo 0
    If bPSView = False Then
    Set vw = ThisDrawing.Views.Add("JUNK_PS")
    vw.LayoutId = ThisDrawing.Layouts(0).ObjectID
    End If

    Set vw = Nothing
    End Sub

    of CPU. Even if i close the Editor it remains at 99%.
     
    Ben Rand, Aug 18, 2004
    #6
  7. viniciusmbo

    Ben Rand Guest

    Doh!

    Dim vw as IAcadView2

    instead of
    Dim vw as AcadView

    Ben
     
    Ben Rand, Aug 18, 2004
    #7
  8. Jimmy Bergmark, Aug 25, 2004
    #8
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.