Jump to content

Recommended Posts

Posted (edited)

Hi!

 

I've long wanted a set of blocks that had a quantity of "intelligence" - but I could never find the time to learn the programming API. Recently I was introduced to the power of dynamic blocks - and I'm quite excited!

 

I've got much of what I want implemented - I need some help trying to finish it up. There are actually several questions contained in this post - please bear with me.

 

First of all, there's a quantity of geometry that needs to be changed depending on a selection. This seems to call for a visibility parameter - and seems to work well. While I'm at it - I should ask if I've implemented this the "hard" way or not. The main geometry that gets affected is a square hatch area - depending on the visibility state, the size of the hatch with its outline square changes. There's no direct numerical relationship between the visibility state name and the size of the square. So I have a dozen states named "15, 30, 75, 110, etc." and the geometry should then be 20'x20', 30'x30', 38'x38', etc. At this time, I've implemented this by creating a number of simple blocks each containing the square hatch at a given size. I then block'ed all these together and toggle them with a visibility state.

 

Now, after I've selected the visibility state, I want to both have it available as an attribute and display a text on the block. I have no idea how to link this with an attribute - and the only way I now know to get the text to display is to generate a dozen texts and control them via the same visibility parameter. Is there a better way? And how can I set an attribute value from this method? I should add - the reason I want to set an attribute value is to later extract that information for counting purposes.

test.dwg

Edited by BigThumper
Added my sample block

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...