SET DIMSTYLE PROGRAMATICALLY

Discussion in 'AutoCAD' started by Casey Roberts, Nov 12, 2004.

  1. Since the system variable "DIMSTYLE" is read only, and therefore (setvar
    "DIMSTYLE" "asdf") does not work, what is the best way to programatically
    set the current dimstyle?

    (command "DIMSTYLE" "restore" "asdf") works, but there's got to be a better
    way.
     
    Casey Roberts, Nov 12, 2004
    #1
  2. Casey Roberts

    Matt W Guest

    What's wrong with what you're doing?
    It does what you want, doesn't it?? (unless I'm missing something here)
     
    Matt W, Nov 12, 2004
    #2
  3. It does, but from reading posts here in this newsgroup, staying away from
    (command .... ) type lisp calls seems to be much more popular in the long
    run. (that and I just want to know)


    Casey
     
    Casey Roberts, Nov 12, 2004
    #3
  4. (vla-put-activedimstyle

    (vla-get-activedocument
    (vlax-get-acad-object))

    <dimstyleObject>

    )
     
    Jason Piercey, Nov 12, 2004
    #4
  5. It depends on the context. If you're in a Screen/Tablet/Pop/Toolbar macro
    item, you can do the same thing without the (command...) setting, like:

    [Set Dim Asdf]^C^C-DIMSTYLE R asdf

    Similarly in a Script. But if you're doing it inside a defun'd command
    definition, you need the (command...) variety. (I'm not familiar enough
    with vla[x]-whatever like Jason's and Herman's to know where those might be
    more appropriate.)
     
    Kent Cooper, AIA, Nov 12, 2004
    #5
  6. It does still open the text screen in 2004, so I've followed it with
    (graphscr)

    I'll try to wrap my head around what you posted - Thanks,
     
    Casey Roberts, Nov 12, 2004
    #6
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.