As I stand over my object reactors with a smoking gun.....

Dean McCarns

Usenet Archive
Joined
Jul 25, 2003
Messages
14
Reaction score
0
Ok I'm about to line up these Reactors and send them to "More Trouble Than There Worth Heavin"!!!!!!!

Although reactors are a noble idea to make AutoCAD a more "object oriented" in nature I have to wonder if maybe there just too much trouble for there own good.

Maybe it's just that I am thicker in the head than most other people and the Reactor concept is just too far out there for me to grasp but maybe (just maybe) there are too many flawes in the idea for it to work properly outside ARX

Ok, this is what I have done and maybe someone out there (with more braincells than I - which is >1) can help me out. Now remember I have been using reactors pretty much forever (well since they were introduced anyway) but I find there lack of consistent expected performance to be somewhat "lacking".

I have created a utility that has the following functionality :

(defun c:TagMyDoor
(select the door)
(setq some of the door information)
(insert the tag block)
(edit the block attributes to match the door information) ;Now this is were I put my object reactor (setq dtagReactor (vlr-pers (vlr-object-reactor (list vDoor) dTag '((:vlr-modified . UpdateDoorTag))))) ;the (list vDoor) is the vla-object that is being taged ;the dTag is being passed as the data for the reactor (which is the vla-symbol of the block being used as the tag)
)

The call back function basically updates the block attributes of the dTag object identified in the data area of the reactor

So it works great when you add a new door and then tag it. I modify the door and the tag updates no problem. BUTTTTTTTT when I close the drawing and open it back up I get the fatal - error: bad argument type: VLReactor:
nil

You know, I thought making a reactor persistent ment that EVEN THOUGH I CLOSE THE DRAWING IT WILL REMAIN WITH THE OBJECT!!!!! Silly me, I thought thats why you used persistent object reactors!!!

Any help is appreciated.

P.S. Yes tried creating the reactor in a seperate namespace vlx

Thanks in advance.
 
Is your reactor code loading automatically, via AcadDoc.lsp or a customized menu's .mnl file?

--
R. Robert Bell, MCSE
www.AcadX.com

| Ok I'm about to line up these Reactors and send them to "More Trouble Than | There Worth Heavin"!!!!!!! | | Although reactors are a noble idea to make AutoCAD a more "object oriented" | in nature I have to wonder if maybe there just too much trouble for there | own good. | | Maybe it's just that I am thicker in the head than most other people and the | Reactor concept is just too far out there for me to grasp but maybe (just | maybe) there are too many flawes in the idea for it to work properly outside | ARX | | Ok, this is what I have done and maybe someone out there (with more | braincells than I - which is >1) can help me out. Now remember I have been | using reactors pretty much forever (well since they were introduced anyway) | but I find there lack of consistent expected performance to be somewhat | "lacking". | | I have created a utility that has the following functionality :
|
| (defun c:TagMyDoor
| (select the door)
| (setq some of the door information)
| (insert the tag block)
| (edit the block attributes to match the door information) | ;Now this is were I put my object reactor | (setq dtagReactor (vlr-pers (vlr-object-reactor (list vDoor) dTag | '((:vlr-modified . UpdateDoorTag))))) | ;the (list vDoor) is the vla-object that is being taged | ;the dTag is being passed as the data for the reactor (which is the | vla-symbol of the block being used as the tag) | ) | | The call back function basically updates the block attributes of the dTag | object identified in the data area of the reactor | | So it works great when you add a new door and then tag it. I modify the | door and the tag updates no problem. BUTTTTTTTT when I close the drawing | and open it back up I get the fatal - error: bad argument type: VLReactor:
| nil
|
| You know, I thought making a reactor persistent ment that EVEN THOUGH I | CLOSE THE DRAWING IT WILL REMAIN WITH THE OBJECT!!!!! Silly me, I thought | thats why you used persistent object reactors!!! | | Any help is appreciated. | | P.S. Yes tried creating the reactor in a seperate namespace vlx | | Thanks in advance. | | | -- | Dean McCarns | ESP,Inc. | 804.675.2377 | |
 
OOOOOOOOOOOOOOOKKKKKKKKKKKKKKKKK!!!

Well (and thanks Robert for - not intentionaly - making me go back over my routine)

I found the error of my ways. Basically - It was user error!!! I've been looking at object reactors alot like acdb reactors. NOT!!!!

Oh and there was the slite little intsy bitsy thing about passing data to the callback event that destroys itself when the drawing is closed, but we wont mention that on a user group that is viewed by thousands of users and potential clients.............

Did I say that outloud!!!
 

Latest threads

Back
Top