Author Topic: Issue with SSGET  (Read 2715 times)

0 Members and 1 Guest are viewing this topic.

Guest

  • Guest
Issue with SSGET
« on: January 24, 2008, 02:36:01 PM »
I've got some programs that I originally wrote for 2004 & 2007 that used
Code: [Select]
(setq a (ssget))
Now it seems I have to use the following to make the programs work.
Code: [Select]
(setq a (ssget "P"))

Have there been some "behind the scene" changes to how SSGET works??

Binky

  • Guest
Re: Issue with SSGET
« Reply #1 on: January 24, 2008, 02:42:37 PM »
I used ssget without arguments in 2008 with no problems. so I don't think that it's something Autocad did.

Not too helpful I know, but it's all I got.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Issue with SSGET
« Reply #2 on: January 24, 2008, 02:52:52 PM »
<guess> I know you're a DIYer so look into the pickfirst sytem variable and the ssget "i" option (implied selection for objects pre-selected when pickfirst is enabled) to consistantly have your proggy sport the behavior you desire. </guess>
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Guest

  • Guest
Re: Issue with SSGET
« Reply #3 on: January 24, 2008, 02:57:40 PM »
<guess> I know you're a DIYer so look into the pickfirst sytem variable and the ssget "i" option (implied selection for objects pre-selected when pickfirst is enabled) to consistantly have your proggy sport the behavior you desire. </guess>
I was messing around with those options a little while ago and so far... no dice!

Guest

  • Guest
Re: Issue with SSGET
« Reply #4 on: January 24, 2008, 03:02:42 PM »
Just to give you some background/insight as to what I'm doing, here's the code.  All I do is push a button and the program is run, only now I have to select the objects whereas before, I was able to select them PRIOR to pushing the button.

Quote
(defun C:MyCopyBase ( / a len)
   (if (setq a (ssget "P"))  ; <-- Used to be (if (setq a (ssget))
      (progn
         (command "copybase" "0,0" a "")
         (setq len (itoa (sslength a)))
         (prompt (strcat "\n " len " Objects have been copied to the clipboard."))
      )
      (prompt "\n No objects have been selected.")
   )
   (princ)
)

And oddly enough, when I select the Copy with Base Point item from the Edit pull-down, I get the same thing.... it prompts me to select objects even though I already have them selected.  I still can't help but think there's something geeked out in the selection options.

FengK

  • Guest
Re: Issue with SSGET
« Reply #5 on: January 24, 2008, 06:02:42 PM »
Try setting system variable "PICKFIRST" to 1.

Guest

  • Guest
Re: Issue with SSGET
« Reply #6 on: January 25, 2008, 08:26:23 AM »
Try setting system variable "PICKFIRST" to 1.

It already is.  Got anything else?

Guest

  • Guest
Re: Issue with SSGET
« Reply #7 on: January 25, 2008, 09:14:38 AM »
Looks like I found the culprit...

Code: [Select]
(command "-plotstamp" "l" "n" "" "")
I added this line to a custom program that is loaded with each drawing and when I removed this line, SSGET works like it's supposed to.  So now my question is... WHY??!

Crank

  • Water Moccasin
  • Posts: 1503
Re: Issue with SSGET
« Reply #8 on: January 26, 2008, 06:44:29 AM »
I think there is a CANCEL somewhere, so the selection is turned off again.

Also I agree with MP that you should have to use (ssget "I"):
Code: [Select]
(defun C:MyCopyBase ( / a len)
   (if (or (setq a (ssget "I"))(setq a (ssget)))
      (progn
         (command "copybase" "0,0" a "")
         (setq len (itoa (sslength a)))
         (prompt (strcat "\n " len " Objects have been copied to the clipboard."))
      )
      (prompt "\n No objects have been selected.")
   )
   (princ)
)
Vault Professional 2023     +     AEC Collection

whdjr

  • Guest
Re: Issue with SSGET
« Reply #9 on: January 26, 2008, 09:03:37 AM »
Try setting system variable "PICKFIRST" to 1.

It already is.  Got anything else?

Are there new additions to the PICKFIRST variable that may have changed some of the previous values in 2008?  Just thinking out loud.