Setting Balloon Standards

Discussion in 'AutoCAD' started by Laura B, Mar 3, 2005.

  1. Laura B

    Laura B Guest

    Hi all

    I am trying to set the properties for balloons in vba. I want to specify to use a custom block rather than the standard balloon. It's fine for creating new drawings - I have set it up in the templates but for existing drawings, I want to automatically set it up in the code.

    I get a Fatal Error: Unhandled Access Violation Exception when it gets to the code to update the block name.

    The code I am trying to use to is as follows:

    dim oSymMgr as McadSymbolBBMgr
    dim oStdMgr as McadStandardMgr
    dim oBomStd as McadBOMStandard

    set oSymMgr = ThisDrawing.Application.GetInterfaceObject("SymBBAuto.McadSymbolBBMgr")
    set oStdMgr = oSymMgr.StandardMgr
    set oBomStd = oStdMgr.currentStandard.BOMStandard
    oBomStd.BalloonStandard.customBlockName = "PB"

    Any help in resolving this problem would be greatly appreciated.

    Many thanks,
    Laura.
     
    Laura B, Mar 3, 2005
    #1
  2. Laura B

    Laura B Guest

    Never fear...I have solved my own problem.

    Is there nothing I can't do hee hee. :eek:Þ
     
    Laura B, Mar 3, 2005
    #2
  3. Laura B

    Laura B Guest

    I have now come across another problem that I am so far unable to help myself with.

    If the custom balloon I want to use is not loaded into the current drawing, how do I go about doing this? I tried to do it by setting the CustomBlockName to the full path of the balloon but this was unsuccessful.

    Thanks again for any assistance,
    Laura.
     
    Laura B, Mar 3, 2005
    #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.