Results 1 to 4 of 4

Thread: Using Reactor to Update Multiple Blocks

  1. #1
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Question Using Reactor to Update Multiple Blocks

    Good Afternoon!

    I was looking to increment the attribute on each copy of a block and I found a lisp routine from Tlindell that does almost what I need. It uses reactors to increment the quantity value in an attribute of a specific block, so whenever that block is copied/pasted/mirrored/etc, each definition gets renumbered incrementally.

    However, this routine only looks at a single block definition, where as I need it to activate for multiple blocks (I'm creating a bunch of blocks prefixed with "Item"; i.e., "Item1", "Item2", "Item3", etc) and increment the attribute with the quantity of *that* block definition.

    My question is: is it wise to have a reactor set up to update up to 30 or 40 block definitions? What are the drawbacks (if any) to this? I'm very new to reactors (they scare me), so any advice on the best way to go about it?

    Thanks All

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

    Default Re: Using Reactor to Update Multiple Blocks

    Have a look at www.Lee-mac.com he has a nice block increment reactor also.

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

    Default Re: Using Reactor to Update Multiple Blocks

    The scary bit can be overcome by rigorous validation of code testing on your part. Once you've established trust in the mechanism, you can begin to leverage it with confidence.

    That said, for that to ultimately take place you'll end up changing how you look at your code and what it does (or doesn't do); more specifically, you're going to have to put in a lot more time and effort to fully planning out all of the specified, and implied tasks, anticipate every potentiality you can think of (and perhaps some that you never have thought of before), and validate the outcomes of the automation process that reactors provide.

    Start small, make sure it works, and add complexity as you see fit, making sure it still works, but for all moving parts.

    Reactors are pretty simple, particularly once you've established a level of comfort, but they can be equally problematic if not done properly - in your case updating myriad blocks at once, and without direct user action (or command line reporting of what's just been done?).

    Be thoughtful, be thorough, and be mindful of the results.. Do these things and you'll do just fine.

    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

  4. #4
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: Using Reactor to Update Multiple Blocks

    Quote Originally Posted by BlackBox View Post
    The scary bit can be overcome by rigorous validation of code testing on your part. Once you've established trust in the mechanism, you can begin to leverage it with confidence.

    That said, for that to ultimately take place you'll end up changing how you look at your code and what it does (or doesn't do); more specifically, you're going to have to put in a lot more time and effort to fully planning out all of the specified, and implied tasks, anticipate every potentiality you can think of (and perhaps some that you never have thought of before), and validate the outcomes of the automation process that reactors provide.

    Start small, make sure it works, and add complexity as you see fit, making sure it still works, but for all moving parts.

    Reactors are pretty simple, particularly once you've established a level of comfort, but they can be equally problematic if not done properly - in your case updating myriad blocks at once, and without direct user action (or command line reporting of what's just been done?).

    Be thoughtful, be thorough, and be mindful of the results.. Do these things and you'll do just fine.

    Cheers
    That gives me a bit of confidence. I know it's going to take a while to get everything sorted (especially while I do have work to do), but it'd be a big step towards putting most of our work into modeling and not into documentation. It should also help me be a better coder.

    Thanks

Similar Threads

  1. 2014: Update Title Blocks
    By drovang710500 in forum MDT - General
    Replies: 3
    Last Post: 2021-06-10, 11:41 AM
  2. Update Title Blocks
    By drovang710500 in forum AutoLISP
    Replies: 4
    Last Post: 2013-12-18, 02:16 AM
  3. Replies: 1
    Last Post: 2009-08-14, 01:05 PM
  4. blocks wont update
    By Sideways Phoenix in forum AutoCAD General
    Replies: 2
    Last Post: 2009-05-14, 07:59 PM
  5. Replies: 1
    Last Post: 2007-01-05, 01:38 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
  •