Jump to content

Recommended Posts

Posted

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

Posted

Perhap an object reactor - with the owner list being the block objects. :thumbsup:

Posted

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

Posted

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.

Posted

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

Posted

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.

Posted

So sorry lee, i did not mean block editor i ment refedit.

 

sorry

Posted

what about

(vla-get-activeselectionset
(vla-get-activedocument
 (vlax-get-acad-object)
)
)

Posted

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

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