PDA

View Full Version : Bug? "vlr-commandEnded" reactor doesn't work with "CALLOUT" command


cvaughn
2006-03-22, 12:31 AM
Adt2006 SP1.

The "vlr-commandwillstart" and "vlr-commandCancelled" both work. The "vlr-commandEnded" doesn't seem to work for me.

I'm just trying to catch the SSM callout placement in order to place them on a particular layer.

Craig

Mike.Perry
2006-03-22, 12:48 AM
Hi Craig

Please note I have *moved* this thread from the AutoCAD Customization (http://forums.augi.com/forumdisplay.php?f=118) forum to this one, as I believe it will be better served here.

Thanks, Mike

Forum Moderator

lspbox
2006-03-23, 12:48 AM
Adt2006 SP1.

The "vlr-commandwillstart" and "vlr-commandCancelled" both work. The "vlr-commandEnded" doesn't seem to work for me.

I'm just trying to catch the SSM callout placement in order to place them on a particular layer.

Craig

What I have done in the past, to be able to set some insert's into the right layer using the internal callout command from the SSM... is to:

1. Have a ACDB reactor using the objectappended, and monitor the INSERT's... pass the ename(s) into a list.

2. Have the EDITOR reactor or in your case the commandEnded event and filter the command call i.e:

(defun editor (reactor params)
(if (and (wcmatch (car params) "CALLOUT")
possible_insert) (progn

. . . your code goes here
))
)

In the case you have a list of enames, it will be good idea to use something like this:

(setq possible_insert_enames
(vl-remove-if-not 'entget possible_insert_enames))

To make sure they are OK.

HTH.

cvaughn
2006-03-23, 11:25 PM
Thanks, Luis. I'll try to delve further into the other reactor callbacks.

I've got limited experience with reactors; I've heard bad things about loading/unloading incorrectly, or maybe it was multiple reactors stepping on each others toes. In any event, I've got some research to do.

Next thing I'd like to do: scale all incoming "CALLOUT" blocks by the dimscale. I notice the "CALLOUT" command has some options for setting the displayed scale and displayed rotation. Has anybody ever successfully prefilled these with something other than the default of 1 (preferably the DIMSCALE)?

Thanks,

Craig