Hi all, I want to make a block which is visible to snap only on a special point, say pivot point.
any hint on this?
Let me guess, anishtain4, you want to point at objects, on the screen,
and have a snap indicator appear only when the cursor
is on a certain point in an INSERT onject of a BLOCK.
If so, one method is to use the function 'grread to do ssgets
of the Aperture window, every half second or every significant
cursor move, and if the subject BLOCK name is within it,
show some marker or something like the oject snap icons,
and return that point data, eithr on finding one,
or, such a find along with some accepting key entry..
Yes, That is what I want, There are blocks that I want a line which is representative to pipes be drawn only on the junction of them not in the middle of fans for example.
The method you said is interesting but don't you think it would has a lot of over head for big drawing?
Easiest solution would be to include point entities within your block definition (on DEFPOINTS layer), then have a short and simple LISP program to toggle your OSNAP to 8 (Node) so that you can only snap to those point entities.
Simple example of such a LISP program:
(defun c:setsnap nil (cond ( *osmode* (setvar 'OSMODE *osmode*) (setq *osmode* nil) ) ( (setq *osmode* (getvar 'osmode)) (setvar 'OSMODE 8) ) ) (princ) )
You could then also call it transparently whilst within a command using 'SetSnap
@Lee_Mac wrote:Easiest solution would be to include point entities within your block definition (on DEFPOINTS layer), then have a short and simple LISP program to toggle your OSNAP to 8 (Node) so that you can only snap to those point entities.
....
Or, if the Block itself doesn't contain other things with insertion points [such as Text or nested Blocks], and if there's only one such location per Block, use the desired location as the defined insertion point of the Block, and do something similar toggling Osnap with the INSert mode [64]. No added entities are needed that way, nor are there Layer concerns. [It may not be necessary with the Points approach, either, to put them on a non-plotting Layer, depending on the Block configuration.]
anishtain4 wrote:Thanks Lee, that is the best solution,
You're very welcome anishtain, I like the simple solutions
anishtain4 wrote:
Nice signature by the way
Thanks!