RoodyHood Posted April 6, 2010 Share Posted April 6, 2010 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! Quote Link to comment Share on other sites More sharing options...
Tommy78 Posted April 6, 2010 Share Posted April 6, 2010 Yes, you can use the "field" option inside your attribute or you could add a hidden linear dimension to your dynamic block. Quote Link to comment Share on other sites More sharing options...
RoodyHood Posted April 6, 2010 Author Share Posted April 6, 2010 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) Quote Link to comment Share on other sites More sharing options...
Tommy78 Posted April 6, 2010 Share Posted April 6, 2010 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. Quote Link to comment Share on other sites More sharing options...
RoodyHood Posted April 6, 2010 Author Share Posted April 6, 2010 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.. Quote Link to comment Share on other sites More sharing options...
dbroada Posted April 6, 2010 Share Posted April 6, 2010 why do you need to regen with every block? Can't it wait until they are all in? Quote Link to comment Share on other sites More sharing options...
RoodyHood Posted April 6, 2010 Author Share Posted April 6, 2010 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... Quote Link to comment Share on other sites More sharing options...
dbroada Posted April 6, 2010 Share Posted April 6, 2010 not to my knowledge Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 6, 2010 Share Posted April 6, 2010 Use the FIELDUPDATE command to update selected fields Quote Link to comment Share on other sites More sharing options...
dbroada Posted April 6, 2010 Share Posted April 6, 2010 Use the FIELDUPDATE command to update selected fields Good try Lee but neither automatic nor available on my copy of 2008 :wink: Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 6, 2010 Share Posted April 6, 2010 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. Quote Link to comment Share on other sites More sharing options...
dbroada Posted April 6, 2010 Share Posted April 6, 2010 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. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 6, 2010 Share Posted April 6, 2010 The only way you are going to get an automatic update is through the use of a reactor. Quote Link to comment Share on other sites More sharing options...
RoodyHood Posted April 7, 2010 Author Share Posted April 7, 2010 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. Quote Link to comment Share on other sites More sharing options...
RoodyHood Posted April 7, 2010 Author Share Posted April 7, 2010 Any one help? I have already started to learn VLISP.. but really wish to know if its the right path.. Thanks!!! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 7, 2010 Share Posted April 7, 2010 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. Quote Link to comment Share on other sites More sharing options...
dbroada Posted April 8, 2010 Share Posted April 8, 2010 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)? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 8, 2010 Share Posted April 8, 2010 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. Quote Link to comment Share on other sites More sharing options...
dbroada Posted April 8, 2010 Share Posted April 8, 2010 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. Quote Link to comment Share on other sites More sharing options...
RoodyHood Posted April 8, 2010 Author Share Posted April 8, 2010 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!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.