ActiveDimStyle

Discussion in 'AutoCAD' started by Nick_Merchant, Jan 14, 2005.

  1. Why is it none of my code works? Every form I attempt gives me the error:

    -> lisp value has no coercion to VARIANT with this type: "MyDimStyle"

    But that DimStyle definitely exists and can betreived with ( vlax-item ... ). Here's the fragment I thought would work:

    ( vlax-put-property ( vla-get-activedocument ( vlax-get-acad-object ) ) 'ActiveDimStyle "MyDimStyle" )

    Thanks!
     
    Nick_Merchant, Jan 14, 2005
    #1
  2. Nick_Merchant

    andywatson Guest

    Nick!
    What's up buddy.

    Its funny--just yesterday and today I'm writing a routine to insert our dimstyles. I tried the same thing you did...but it doesn't work the same as layers, you need to send it the actual dimstyle object.

    (setq mydimstyleObj
    (vla-item <DimStyleCollection> "MyDimStyle"))
    (vlax-put-property <DocObj> 'ActiveDimStyle mydimstyleObj)

    Good luck!
     
    andywatson, Jan 14, 2005
    #2
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.
Similar Threads
There are no similar threads yet.
Loading...