need a bit of activex code

Discussion in 'AutoCAD' started by Chuck, Aug 9, 2004.

  1. Chuck

    Chuck Guest

    Hi -

    I want to write a little lisp routine to set the leader arrowhead to "Closed
    filled" for dimstyles in the current drawing. As you might imagine, this is
    to fix drawings that have made a round trip to R14 (and back to 2002 or
    above). I can handle finding the names of the dimstyles I want to change
    and looping through them. But I'm thinking activex is the best way to
    actually make the change to each dimstyle. Unfortunately I haven't learned
    to use activex yet. Can someone spare me a couple lines of activex code?

    Thanks -

    Chuck
     
    Chuck, Aug 9, 2004
    #1
  2. Chuck,

    Here is a modified version of the function that I use to do this - it uses the dim1 command to update the current dimstyle - you should be able to modify this to suite your needs.

    Peter

    ; eg:(F:DIM_SETBLOCK "_DOTBLANK")
    ;eg:(f:dim_setblock "_OBLIQUE")

    (defun f:dim_setblock (nam)
    (setvar "DIMBLK1" nam) (setvar "DIMBLK2" nam)
    (cond
    ((= nam "_OBLIQUE") (setvar "DIMASZ" (* (getvar "DIMTXT") 0.8)))
    ((= nam "_DOTBLANK") (setvar "DIMASZ" (* (getvar "DIMTXT") 0.25)))
    )
    (vl-cmdf "_.dim1" "_save" (getvar "DIMSTYLE") "_y")
    )
     
    petersciganek, Aug 11, 2004
    #2
  3. Chuck

    Chuck Guest

    Thanks for the reply, I'll see if I can get something like that working.
    Btw I was unaware of vl-cmdf and the difference between it and command, so
    thanks for bringing that to my attention.

    Chuck

    the dim1 command to update the current dimstyle - you should be able to
    modify this to suite your needs.
     
    Chuck, Aug 11, 2004
    #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.