flowerrobot Posted August 15, 2009 Posted August 15, 2009 Good morning guys Im haveing a bit of trubble with a reactor . Im trying to set up the reactor on command of 'refedit' to return the name of the item edited. And well its got me stumped atm. Getting the 'bedit' bit to work is no issue. however finding what is being editted is... I thought purhaps entlast, but that returns last item created Any idears Thanks heaps flower Quote
Lee Mac Posted August 15, 2009 Posted August 15, 2009 Perhap an object reactor - with the owner list being the block objects. Quote
flowerrobot Posted August 15, 2009 Author Posted August 15, 2009 So lee your saying instead of the command watch Watch when the block (all blocks) is edited? What im trying to do it create a flag, that refedit is on & the name of the item edited. Which will then allow me to create a list of all items in that block. So that only they can be edited. Which also means there needs to some thing watching add & remove of enitys to remove or add to the list Quote
Lee Mac Posted August 15, 2009 Posted August 15, 2009 Why not use both? Have the function react from the BEdit command, and then perhaps initiate an object reactor to monitor the objects. Just stabbing in the dark here - never done it myself. Quote
flowerrobot Posted August 15, 2009 Author Posted August 15, 2009 Purhap lee, i could have your input on the best way If you go into a block and use the command .mocoro for instance and select an item out side of the block it will move it even tho the standard command .move will not This is the same situation im in at the moment. So was thinking to create a flag, that refedit is active so it looks at a list if the item is on the list, follow orders if not do the next item Quote
Lee Mac Posted August 15, 2009 Posted August 15, 2009 I would react from the End of the BEdit command, and collect a selection set of all objects in the block editor, then perhaps use an object reactor on these. Quote
flowerrobot Posted August 15, 2009 Author Posted August 15, 2009 So sorry lee, i did not mean block editor i ment refedit. sorry Quote
alanjt Posted August 15, 2009 Posted August 15, 2009 what about (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object) ) ) Quote
flowerrobot Posted August 16, 2009 Author Posted August 16, 2009 Good thought, Tho im not fantatic in vl, How would i get that item in the selection set, to compare again (setq he1 (vlax-ename->vla-object (car (entsel)))) or even better if its a block what its name is? Im currently using as my plimanry code for it all (vl-load-com) (vlr-command-reactor nil ' ((:vlr-commandWillStart . beditreac)) ) ;****************************************************** (defun beditreac (calling-reactor startcommandInfo) (setq peinis startcommandInfo) (if (= (car startcommandInfo) "REFEDIT") (progn (setq hi (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object) ) )) ) ) ) Quote
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.