-Attext and dialogbox

Discussion in 'AutoCAD' started by Daniel Aldridge, Dec 20, 2004.

  1. Hello,

    I am trying to execute the "-Attext" command, via
    ThisDrawing.SendCommand ("-ATTEXT" & vbCr & "SDF" & _ vbCr & "TemplateFile.TXT" & vbCr & "OutPutFile.TXT" _
    & vbCr & "Y" )

    The problem is that whenever I execute the code, a dialogbox pops up to request the Template file and the out put file. How do I supress the dialogbox and just have vba enter in the commands...
    I would have sworn there was some sort of code to receive input values for the AutoCAD command line.
    thanks,
    Daniel
     
    Daniel Aldridge, Dec 20, 2004
    #1
  2. Solution:

    The "-" character before the "Attext" command tells autocad to supress the dialog box. For some reason this does not work. One option that I have come across is to set "FileDia" to 0. In other words, issue this command before the "-Attext" command:
    .Sendcommand("FileDia" & vbcr & "0" & vbcr)
     
    Daniel Aldridge, Dec 20, 2004
    #2
  3. Daniel Aldridge

    krispy Guest

    instead of using sendcommand to set a system variable use setvariable... for eg:
    ThisDrawing.SetVariable "FILEDIA", 0
     
    krispy, Dec 20, 2004
    #3
  4. The "-" character before the "Attext" command tells autocad to supress the dialog box. For some reason this does not work.
    That only works from the actual command line, not through code unless you
    issue the FILEDIA first.
    Never use the sendcommand unless you absolutely have to! In this case use
    SetVariable("FILEDIA", 0)

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Dec 22, 2004
    #4
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.