Author Topic: Snapmode coming on when not wanted  (Read 2376 times)

0 Members and 1 Guest are viewing this topic.

Prickle Farmer

  • Newt
  • Posts: 33
  • 35+ years of AutoCAD / BricsCAD
Snapmode coming on when not wanted
« on: March 03, 2015, 05:56:35 PM »
I have inherited some lisp software and I'm trying to update it for users on Acad2015.  Somehow the software changes snapmode to on (1).  I am aware of SNAPMODE command, SETVAR SNAPMODE, F9 function key and the snapmode button at the bottom of the acad screen.  Does anyone know any other way to invoke snapmode that I can search for in the code?
I'd rather have a bottle in front of me than a frontal lobotomy.

Prickle Farmer

  • Newt
  • Posts: 33
  • 35+ years of AutoCAD / BricsCAD
Re: Snapmode coming on when not wanted
« Reply #1 on: March 04, 2015, 12:58:49 AM »
I found it!!!  Nothing extraordinary, just code that ran a legacy "SNAP" command buried in a function call.  It only took me 12 hours to find it.
I'd rather have a bottle in front of me than a frontal lobotomy.

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Snapmode coming on when not wanted
« Reply #2 on: March 04, 2015, 09:19:52 AM »
12 hours! That must be a lot of code :). Anyhoo .. .welcome to TheSwamp.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Prickle Farmer

  • Newt
  • Posts: 33
  • 35+ years of AutoCAD / BricsCAD
Re: Snapmode coming on when not wanted
« Reply #3 on: March 04, 2015, 06:14:39 PM »
Thanks ronjonp.   65 .lsp files totaling 415 Kb so at about 30 lines of code per Kb that means about 12,500 lines of code.  A reasonable size haystack!!
I'd rather have a bottle in front of me than a frontal lobotomy.

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Snapmode coming on when not wanted
« Reply #4 on: March 04, 2015, 07:02:46 PM »
If you set the indexing options in Windows 7 to index the contents of .lsp files, you can use the standard Windows Explorer search bar to search all .lsp files for keywords such as 'snapmode' etc.

Alternatively, you could use a 'Find in Files' functionality offered by most code editors, such as Notepad++.

Prickle Farmer

  • Newt
  • Posts: 33
  • 35+ years of AutoCAD / BricsCAD
Re: Snapmode coming on when not wanted
« Reply #5 on: March 04, 2015, 07:45:19 PM »
Thanks Lee.  I must update my old ways.  I am 56 years old and still use command line stuff eg.  FIND "this text" *.lsp>results.txt  I use Notepad ++ so I will check out Find in Files.
BTW I admire your work. I have used you dynamic block visibility functions in some of my code.  I take data from another software package and change the visibility of dynamic blocks based on that data.
I'd rather have a bottle in front of me than a frontal lobotomy.

RAYAKMAL

  • Guest
Re: Snapmode coming on when not wanted
« Reply #6 on: March 04, 2015, 09:44:56 PM »
I use free utility 'SearchmyFiles' from www.nirsoft.net.
No installation needed.
It really works for me.

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Snapmode coming on when not wanted
« Reply #7 on: March 05, 2015, 12:27:07 PM »
BTW I admire your work. I have used you dynamic block visibility functions in some of my code.  I take data from another software package and change the visibility of dynamic blocks based on that data.

Many thanks Prickle Farmer - I'm delighted to hear that you find my functions useful!  :-)