Jump to content

Dynamic updating block's attributes..


RoodyHood

Recommended Posts

Hi

Im new in here so forgive me if I put this thread in wrong section.

I have problem which I cant find clear answer for:

 

Is there any way to set block parameter - lenght of an object, to update itself whenever I rescale it. Is there any way to do it with lisp?

 

Thank U in advance for fast reply..

Cheers!

Link to comment
Share on other sites

  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

  • RoodyHood

    7

  • dbroada

    6

  • Lee Mac

    6

  • Tommy78

    2

Top Posters In This Topic

Yes, you can use the "field" option inside your attribute or you could add a hidden linear dimension to your dynamic block.

Link to comment
Share on other sites

Yeah I am using fileds inside attributes. The thing is I want use these value (lenght) for further calculation inside this block. To make it right I need it to update automatically whenever I rescale it along X axis. Do u know what I mean? ( my english is poor I know)

Link to comment
Share on other sites

Yeah I am using fileds inside attributes. The thing is I want use these value (lenght) for further calculation inside this block. To make it right I need it to update automatically whenever I rescale it along X axis. Do u know what I mean? ( my english is poor I know)

 

Yes, i think i know what you mean, you have to add a stretch action to your block to change the length, then add an attribute with a field using the "blockplaceholder/distance" parameter.

This should work.

 

I have to add that to update the value in your field you will have to do a regen (command RE or REGEN or REA or REGENALL)

 

Hope that helps.

Link to comment
Share on other sites

Yes regen works... but.. lets say my file weight bout 27 mb and I have to put hundreds of blocks like this. It will take ages to regen every time I put in the block ( every one have diffrent values). Is there a way to make the attributes updated automaticly whenever I change sth in model view? Will lips do any good? Im desperated .. it will save me sooo much work.. hours of editing values manually ...

 

Please help..

Link to comment
Share on other sites

Unforntunatelly It can't. I need to know if there's point of searching for solution how to do it. Maybe someone can tell me IF there's ANY way to do the blocks to update itself automaticly whenever I change its lenght.

 

Thanks for all replies...

 

Please help me...

Link to comment
Share on other sites

Use the FIELDUPDATE command to update selected fields :)
Good try Lee but neither automatic nor available on my copy of 2008 :wink:
Link to comment
Share on other sites

Good try Lee but neither automatic nor available on my copy of 2008 :wink:

 

Fields aren't automatic either up to a regen - this is an alternative to regen'ing the whole drawing, but rather only updating the selected fields.

Link to comment
Share on other sites

I can't test your option as it doesn't appear to be included in my copy of 2008 so unless I'm missing something it won't be of use to the OP either.

Link to comment
Share on other sites

Hmm.. what do U mean through reactor? I dont understand.

 

Anyway is there a way to do it with VisualLisp ????

I'm desperatly looking for any hint .. where should I look for it.. whom to ask..

 

Thank U in advance for a fast reply.

Link to comment
Share on other sites

Any one help? I have already started to learn VLISP.. but really wish to know if its the right path..

 

Thanks!!!

Link to comment
Share on other sites

A reactor is a VLA-Object that may be triggered by an event, and upon triggering may evaluate a call-back function.

 

For your situation you would need to use an object reactor, and have the callback function update the field object upon modification of the object in question.

Link to comment
Share on other sites

Lee,

 

I don't know much about reactors so can you explain.

 

Presumably you have to enable them when you start the drawing and they watch for a particular event, and when that event happens they perform a function. Doesn't this slow the whole process down rather than perforing that function on demand (albeit probably by a few milliseconds at a time)?

Link to comment
Share on other sites

Reactors aren't too taxing on the processing, but they would be a hassle to set up - its not just a case of putting code in the ACADDOC and you're done... if it were me, I would just go with regen or fieldupdate.

Link to comment
Share on other sites

that was roughly the conclusion I reached when I first looked at reactors. I discovered there was nothing I needed to do that had to be done NOW so I prefered to just wait for the regen to happen.

 

The OP is clearly wanting to do something outside my experience.

Link to comment
Share on other sites

Oh boy.. seems it's harder then I thought...

I am starting to learn Visual Lisp maybe it will lead me somehow to solution.

 

Thanks guys for answers... At least I know what am I searching for..

 

Cheers!!!

Link to comment
Share on other sites

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...