See the top rated post in this thread. Click here

Results 1 to 3 of 3

Thread: Reseting one property of a dynamic block

  1. #1
    I could stop if I wanted to
    Join Date
    2009-10
    Posts
    262
    Login to Give a bone
    0

    Default Reseting one property of a dynamic block

    I would like to just reset one property of a dynamic block with lisp...

  2. #2
    I could stop if I wanted to
    Join Date
    2009-10
    Posts
    262
    Login to Give a bone
    0

    Default Re: Reseting one property of a dynamic block

    Anyone have any ideas of how this could occur?

  3. #3
    Past Vice President / AUGI Volunteer peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu HI
    Posts
    1,106
    Login to Give a bone
    1

    Default Re: Reseting one property of a dynamic block

    Here is a place to start.

    If you have the vla-object of a dynamic block you can get the dynamic block properties of that block.

    This returns a list of sublists including the propertyname, value and the vla-object of the property (which you can use to change the property using activeX.

    Part of using code is to try to code a solution first, then ask questions...


    P=

    Code:
    (defun DynamicSublists (objSelection / lstProperties)
     (if (and (= (type objSelection) 'vla-object)
              (vlax-property-available-p objSelection "IsDynamicBlock")
              (= (vla-get-IsDynamicBlock objSelection) :vlax-true)
              (setq lstProperties (errortrap '(vlax-invoke objSelection "GetDynamicBlockProperties")))
         )
      (mapcar '(lambda (x)(list (vla-get-propertyname X)
                                (vlax-get X "value")
                                X
                          )
               ) 
               lstProperties
      )
     )
    )
    
    (defun ErrorTrap (symFunction / objError result)
     (if (vl-catch-all-error-p
          (setq objError (vl-catch-all-apply
                         '(lambda (X)(set X (eval symFunction)))
                          (list 'result))))
      nil
      (if result result 'T)
     )
    )
    
    (vl-load-com)
    AutomateCAD

Similar Threads

  1. 2014: Bulk Dynamic Block Property Editing
    By mbrandt5 in forum Dynamic Blocks - Technical
    Replies: 0
    Last Post: 2015-05-06, 09:04 PM
  2. Help with Dynamic Block Vlax-Put-Property
    By jeffmoran in forum AutoLISP
    Replies: 10
    Last Post: 2012-08-23, 05:06 PM
  3. precision of dynamic block property
    By parkerfeldman in forum AutoLISP
    Replies: 1
    Last Post: 2009-03-03, 03:24 PM
  4. Dynamic Block Property to Allow TextStyle Changes
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2008-02-28, 08:39 PM
  5. Can Dynamic Block property's be add to a drawn part on screen
    By dave.buckberry in forum Dynamic Blocks - Technical
    Replies: 6
    Last Post: 2006-08-28, 04:25 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
  •