Jump to content

Recommended Posts

Posted

Hi All,

 

Was wondering if anyone was able to slightly tweak this routine so that snaps work while the command is running and you are placing the text? Not sure if its a simple thing to add in or not..

 

Cheers!

 

(as usual, props to lee mac for setting up of course)

NumIncV3-9.lsp

Posted
2 minutes ago, masterfal said:

Hi All,

 

Was wondering if anyone was able to slightly tweak this routine so that snaps work while the command is running and you are placing the text? Not sure if its a simple thing to add in or not..

 

Cheers!

 

(as usual, props to lee mac for setting up of course)

NumIncV3-9.lsp 296.3 kB · 0 downloads

 

doh

 

image.thumb.png.09909c3888cbfe27af31ab3bb496bf17.png

Posted

I tried to change the code to use https://www.lee-mac.com/grsnap.html

 

It kind of works, but flickers a lot because I have to hide the text so it won't snap to itself.

Its not optimal, but you might prefer it.

Here is what lines to add and the positions where to add it:

;line 2178:     (   (member g1 '(3 5))
(redraw)
(vla-put-Visible bor :vlax-false)
(vla-put-Visible obj :vlax-false)
(vla-update bor)
(vla-update obj)
(setq g2 (SnapFunction g2 SnapMode))
(vla-put-Visible bor :vlax-true)
(vla-put-Visible obj :vlax-true)
(vla-update bor)
(vla-update obj)
;line 2179      (setq p1 (vlax-3D-point (trans g2 1 0)))

and:

; line 558    (cond
( (not
    (and
      LM:grsnap:snapfunction
      (member (type LM:grsnap:snapfunction) '(subr usubr exrxsubr))
      (setq SnapFunction (LM:grsnap:snapfunction))
      (setq SnapMode (getvar 'osmode))
    )
  )
  (princ "\ngrsnap functions not loaded.")
)
; line 559        (   (= 4 (logand 4 (cdr (assoc 70 (tblsearch "layer" (getvar 'clayer))))))

 

Of couse, grsnap should be loaded beforehand for this to work.

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