Results 1 to 3 of 3

Thread: Dynamic Block Elements React to Attribute Changes?

  1. #1
    Member
    Join Date
    2001-02
    Posts
    7
    Login to Give a bone
    0

    Default Dynamic Block Elements React to Attribute Changes?

    I've searched around these forums, and elsewhere on the internet, to no avail.

    Is it possible to create a Dynamic Block with an attribute, multiline or not, wherein the block's drawing elements react and change automatically when the content of the attribute is changed? For example, let's say I've got a label tag that consists of a rectangle and a multiline attribute centered in that rectangle. I'd like the rectangle of the dynamic block to automatically resize itself in relation to the attribute when I edit the contents of the attribute.

    My actual application is a bit more complicated; but that's the gist of it. Here's some background on my specific application.

    I've got a lisp program I created years ago that allows me to create titles for drawing details. The program allows me to input three lines of text, then select a scale for the detail (and at which to insert the title, and whether or not to attach a detail reference bubble to the title and the labels in the bubble.

    The program creates a unique block for that title that automatically draws the title text, an underline under the bottom title text, and draws the scale label, and the detail bubble and their tags based on standard formats defined by the user via an .INI file. The program can also take the information from such a detail title block to allow it to be edited in any way, including changing the originally selected format, eliminating the detail bubble and more; and in so doing, adjusts all lines, and spacings as appropriate.

    I'm thinking that I might be able to accomplish something very similar via Dynamic Blocks and multiline attributes; but the being able to do so hinges on being able to have the underlining line adjust itself automatically when the title attribute is edited.

    Is this possible? Or do I have a new wish list submission for next year's wish list.

  2. #2
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Dynamic Block Elements React to Attribute Changes?

    An MAtt's width cannot be controlled by any parameters/actions in a DBlock. So you will at least always have the disconnect between the line length and the MAtt width.

    (Although I presume a persistent reactor could address that issue.)
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  3. #3
    Member
    Join Date
    2001-02
    Posts
    7
    Login to Give a bone
    0

    Default Re: Dynamic Block Elements React to Attribute Changes?

    My experimentation with the idea today got me about 90% of the way to where I want to be. I created a block with four visibility states - titles with detail references, a version with the scale text as "Not To Scale" and a version with the scale text "Scale " and an attribute to enter the scale, and similar versions but without the detail reference.

    So it's a MAtt with a line underlining it, and the scale text below the line and aligned with the left end of the line. The detail reference is positioned at the left of the title line.

    I put a single linear parameter from the centre of the Line to it's left endpoint, then associated two actions with it; both are Stretch actions. The first Stretch Action stretches the left end of the line, moving the scale text and detail reference (visible or not) with it; and the second Stretch action stretches the right end of the line by the same amount. So the stretch looks like an expansion from both ends.

    I can almost live with it as is. It's about as much (or rather, little) work as the Lisp Program I've been working with for years. It's only drawback at this point is that I can't accurately stretch the line to the extents of the text as the Lisp program does.

    I can get really close to the text's extents with the Dynamic Block; which is acceptable. After all, the Lisp Program doesn't compensate for badly defined fonts (like RomanS); so even it sometimes creates titles with lines that extend beyond the title text's actual extents.

    I'll have to look into the persistent reactor idea though. I've not worked with reactors yet; it could be interesting.

Similar Threads

  1. 2014: Dynamic block with only some annotative elements
    By jpcadconsulting347236 in forum Dynamic Blocks - Technical
    Replies: 0
    Last Post: 2013-12-17, 06:42 PM
  2. How to change dynamic block attribute default values based on block selected?
    By zeirz109180 in forum Dynamic Blocks - Technical
    Replies: 2
    Last Post: 2013-12-13, 02:20 PM
  3. 2012: Rotate Attribute in a Dynamic Block
    By KansasCAD in forum Dynamic Blocks - Technical
    Replies: 5
    Last Post: 2013-03-13, 06:38 PM
  4. Dynamic Block Attribute problem
    By nate.225159 in forum AutoCAD 3D (2007 and above)
    Replies: 2
    Last Post: 2009-08-03, 09:30 PM
  5. Can't get attribute to rotate in dynamic block
    By tim.101799 in forum Dynamic Blocks - Technical
    Replies: 2
    Last Post: 2006-07-20, 04:14 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
  •