Results 1 to 8 of 8

Thread: Beginner Question How to change the dynamic block properties in AutoLisp

  1. #1
    Member
    Join Date
    2016-09
    Posts
    5
    Login to Give a bone
    0

    Cool Beginner Question How to change the dynamic block properties in AutoLisp

    I am pretty new in autolisp. what I want to do is to use insert command to insert a dynamic block to my drawing let's say
    (command "_INSERT" "C:\\dynamic_block.dwg" insert_point 1 1 0 )

    it has a property (attribute) called "length", then how to capture the block and set its properties length in my AutoLisp code?

    Thank you in advance for your help.

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Beginner Question How to change the dynamic block properties in AutoLisp

    Check your ATTDIA + ATTREQ sysvar values, as these will allow you to supply values.


    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    Member
    Join Date
    2016-09
    Posts
    5
    Login to Give a bone
    0

    Default Re: Beginner Question How to change the dynamic block properties in AutoLisp

    Quote Originally Posted by BlackBox View Post
    Check your ATTDIA + ATTREQ sysvar values, as these will allow you to supply values.


    Cheers
    Thanks for replying, can you show me a more detailed step? specific commands that can capture the block and set its att value?

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Beginner Question How to change the dynamic block properties in AutoLisp

    Quote Originally Posted by chen.jing735828 View Post
    Thanks for replying, can you show me a more detailed step? specific commands that can capture the block and set its att value?
    When ATTDIA == 0, the INSERT Command issues prompts at the Command Line, instead of using a dialog, which means you can supply desired values to the INSERT Command.

    When ATTREQ == 1, the prompts for Attribute values is turned on (or dialog is shown, depending on ATTDIA value).


    With that understanding... If you want a LISP routine to do this for you, store the original values of ATTDIA & ATTREQ, set them accordingly, invoke the INSERT Command, supply the necessary parameters to successfully insert, and populate the attribute(s), and finally restore the original ATTDIA & ATTREQ values.


    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  5. #5
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

    Default Re: Beginner Question How to change the dynamic block properties in AutoLisp

    Dynamic blocks have both properties and attributes. Are you wanting to change an attribute named "Length" or are you wanting to change a length dynamic property? Or both?

  6. #6
    Member
    Join Date
    2016-09
    Posts
    5
    Login to Give a bone
    0

    Default Re: Beginner Question How to change the dynamic block properties in AutoLisp

    Quote Originally Posted by dgorsman View Post
    Dynamic blocks have both properties and attributes. Are you wanting to change an attribute named "Length" or are you wanting to change a length dynamic property? Or both?
    Sorry for the confusion, Actually both. but Firstly I want to understand how to change the *** length dynamic property***

  7. #7
    Member
    Join Date
    2016-09
    Posts
    5
    Login to Give a bone
    0

    Default Re: Beginner Question How to change the dynamic block properties in AutoLisp

    Quote Originally Posted by BlackBox View Post
    When ATTDIA == 0, the INSERT Command issues prompts at the Command Line, instead of using a dialog, which means you can supply desired values to the INSERT Command.

    When ATTREQ == 1, the prompts for Attribute values is turned on (or dialog is shown, depending on ATTDIA value).


    With that understanding... If you want a LISP routine to do this for you, store the original values of ATTDIA & ATTREQ, set them accordingly, invoke the INSERT Command, supply the necessary parameters to successfully insert, and populate the attribute(s), and finally restore the original ATTDIA & ATTREQ values.


    Cheers
    wow, It worked, Thanks for that, but what about changing the dynamic properties of the block I am inserting, (eg. stretch the length of a rectangle) Do you have any ideas about that?

  8. #8
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    561
    Login to Give a bone
    0

    Default Re: Beginner Question How to change the dynamic block properties in AutoLisp

    Go to www.lee-mac.com he has a dynamic block lisp, so insert block at original scale which I take would be 1 then just update the dynamic block using Lee's code.

Similar Threads

  1. Replies: 6
    Last Post: 2014-09-20, 03:54 AM
  2. Accessing Dynamic Block feature with AutoLisp
    By paulmon in forum AutoLISP
    Replies: 3
    Last Post: 2010-10-02, 12:47 AM
  3. Dynamic Block Beginner Videos Suggestion
    By martins.183886 in forum Dynamic Blocks - Technical
    Replies: 1
    Last Post: 2010-02-03, 03:00 PM
  4. AutoLISP function to get values of existing dynamic block insert
    By truevis in forum Dynamic Blocks - Technical
    Replies: 0
    Last Post: 2007-11-17, 04:34 PM
  5. Replies: 0
    Last Post: 2005-06-06, 11:57 AM

Tags for this Thread

Posting Permissions

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