Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Changing Dimension Arrow From "Closed Filled" to "Dot Small"

  1. #1
    Member
    Join Date
    2008-06
    Posts
    32
    Login to Give a bone
    0

    Exclamation Changing Dimension Arrow From "Closed Filled" to "Dot Small"

    I am trying to adapt a lisp routine that our office currently uses to turn a dim extension line on and off by clicking on it, so that it will change the dimension's arrow to "Dot Small" from "Closed Filled". I have attached the lisp file that I am trying to alter, if anyone can give me a hand or point me in the right direction, it would be appreciated.
    Attached Files Attached Files

  2. #2
    I could stop if I wanted to
    Join Date
    2003-12
    Location
    Pittsburgh, PA
    Posts
    355
    Login to Give a bone
    0

    Default Re: Changing Dimension Arrow From "Closed Filled" to "Dot Small"

    Try this
    Code:
    (defun c:test (/ obj)
      (vl-load-com)
       (setq obj (vlax-ename->vla-object (car (entsel "\nSelect dimension: "))))
      (if
        (and (vlax-property-available-p obj 'Arrowhead1Type) (vlax-property-available-p obj 'Arrowhead2Type))
        (progn
        (vlax-put obj 'Arrowhead1Type 11)
        (vlax-put obj 'Arrowhead2Type 11)
        )
        (princ "\nNo can change!")
        )
      (princ)
      )
    This will change any style arrow to 'Dot Small'... if you need to check if the original arrows are 'Closed Filled' let me know.
    Last edited by lpseifert; 2010-03-10 at 08:18 PM.

  3. #3
    Member
    Join Date
    2008-06
    Posts
    32
    Login to Give a bone
    0

    Default Re: Changing Dimension Arrow From "Closed Filled" to "Dot Small"

    Thanks for the lisp routine lpseifert, it does change both of the dimension arrows, but the code that I am trying to alter will allow me to select only one of the dimension arrows at a time (this is really what I am looking for). I am hoping to be able to leave one as a "closed filled" arrow, while changing the other to a "dot small" arrow. If you have any further ideas, I would appreciate it greatly. Thanks again for your help.

  4. #4
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Changing Dimension Arrow From "Closed Filled" to "Dot Small"

    Maybe something like this...
    Code:
    (defun c:Test (/ #Obj #Prop #Choice)
      (and
        (setq #Obj (car (entsel "\nSelect Dimension: ")))
        (setq #Obj (vlax-ename->vla-object #Obj))
        (or (vlax-property-available-p #Obj 'Arrowhead2Type)
            (alert "Invalid object.")
        ) ;_ or
        (setq #Prop (vla-get-Arrowhead2Type #Obj))
        (not (vla-put-Arrowhead1Type #Obj 11))
        (not (initget 0 "Yes No"))
        (or (setq #Choice (getkword "\nFlip Arrowheads? [Yes/No] <No>: "))
            (setq #Choice "No")
        ) ;_ or
        (eq #Choice "Yes")
        (mapcar '(lambda (p v) (vlax-put-property #Obj p v))
                '(Arrowhead1Type Arrowhead2Type)
                (list #Prop 11)
        ) ;_ mapcar
      ) ;_ and
      (princ)
    ) ;_ defun
    Last edited by alanjt; 2010-03-10 at 10:42 PM.

  5. #5
    Member
    Join Date
    2008-06
    Posts
    32
    Login to Give a bone
    0

    Default Re: Changing Dimension Arrow From "Closed Filled" to "Dot Small"

    Thanks for the suggestion alanjt, but after selectiing the dimension in question, I get the following error message:

    ; error: no function definition: VLAX-ENAME->VLA-OBJECT

  6. #6
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Changing Dimension Arrow From "Closed Filled" to "Dot Small"

    Quote Originally Posted by joshbracey15 View Post
    Thanks for the suggestion alanjt, but after selectiing the dimension in question, I get the following error message:

    ; error: no function definition: VLAX-ENAME->VLA-OBJECT
    You have to type (vl-load-com). I have it in my acaddoc.lsp, so I don't generally think about it.

    I've updated the code.

  7. #7
    Member
    Join Date
    2008-06
    Posts
    32
    Login to Give a bone
    0

    Default Re: Changing Dimension Arrow From "Closed Filled" to "Dot Small"

    Okay, you are probably getting tired of me by now, but I seem to get a different error now. When I select the dimension that I wish to change, a window pops up saying "invalid object". So on the plus side the vl-load-com, seems to have solved the other error I was getting previously.

  8. #8
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Changing Dimension Arrow From "Closed Filled" to "Dot Small"

    Quote Originally Posted by joshbracey15 View Post
    Okay, you are probably getting tired of me by now, but I seem to get a different error now. When I select the dimension that I wish to change, a window pops up saying "invalid object". So on the plus side the vl-load-com, seems to have solved the other error I was getting previously.
    Try it now. I decided to take a more generic route on checking if the selected object was valid. I had only added allowance if the selected object was a DimAligned or Dimangular. Wasn't really thinking clearly, sorry about that.

  9. #9
    Member
    Join Date
    2008-06
    Posts
    32
    Login to Give a bone
    0

    Talking Re: Changing Dimension Arrow From "Closed Filled" to "Dot Small"

    Thanks so much, that works perfectly !!

  10. #10
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Changing Dimension Arrow From "Closed Filled" to "Dot Small"

    Quote Originally Posted by joshbracey15 View Post
    Thanks so much, that works perfectly !!
    Happy to assist.

Page 1 of 2 12 LastLast

Similar Threads

  1. Changing the "Line1", "Line2", etc headers in the Project description dialog box?
    By brynjolfur853743 in forum AutoCAD Electrical - General
    Replies: 1
    Last Post: 2013-04-15, 08:25 PM
  2. Replies: 0
    Last Post: 2012-06-06, 11:54 AM
  3. ENTIDADES EN ALIGNMENT COMO "FIXED", "FLOTING" y "FREE"
    By cadia in forum AutoCAD Civil 3D - General
    Replies: 1
    Last Post: 2009-02-01, 04:21 AM
  4. Replies: 1
    Last Post: 2006-06-13, 06:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •