Jump to content

Recommended Posts

Posted

Currently trying to work with reactors and not having much success.

 

  • Im trying to log every new entity created and errased.

As far as i can work out, a reactor fires at the start and the end, Thus if you use the line command, It will be logged the start, But if you draw 6 lines then cancell the end/cancell reactors will fire, Thus this causes entlast to not grab every enitity created.Have i missed a reactor type that will fire every time a object is created/removed ?

  • Get a selection set.

When a start reactor begins, alot of the time you have yet to make a selection set, hence you carnt get the active selection selection set, so do how you go about getting the previouse selection set?

 

Thanks guys

Flower

Posted

Maybe this will give you some ideas, it’s thrown together and needs more work but it might get you in the right direction.

 

The problem about retrieving entity information when something is undone , canceled or erased is that the reactor will return the entity name but the entity information will be nil.

 

 
(vl-load-com)
(defun OAcb (a b / nent)  
(setq nent (vl-princ-to-string(cadr b)))
(princ (strcat nent " Added to Drawing"))
 );_defun
(defun OEcb (a b / delent)
(setq delent (vl-princ-to-string(cadr b)))
(princ (strcat delent " Deleted From Drawing"))
 );_defun
(if (not (= (type OArct) 'VLR-AcDb-Reactor))
(progn
(setq OArct(vlr-acdb-reactor nil '((:vlr-objectAppended . OAcb))))
(setq OErct(vlr-acdb-reactor nil '((:vlr-objectErased . OEcb))))
);_progn
 );_if

Posted

Thank you my friend this should set me well on my way for atleast the first issue thanks!!

 

Flower

Posted

Im currently trying to modify the refedit structure. Well more so trying to replicate Acad's Mec Refedit Block structure. Where you can edit a block then once completed,Change the name and base point, Thus for this to happen i have workout tow methods (if you can see a simpler method please let me kno)

 

Monitor every created and distroyed item and namespace change. Thus at the end, Replicated these into a new block

 

Or

 

Create a back of up of the original ,then once complete take the new block table and create a new one identical then replace the table with the backed up information

 

Im currently just in the exploring stage.

Still having trubble identifying the exact block entity being editied

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