TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: whdjr on December 31, 2005, 11:57:11 AM

Title: Edit a selected attribute?
Post by: whdjr on December 31, 2005, 11:57:11 AM
If I have an attributed block selected is there any way I can use the attedit command (or some other coomand) to go straight to the edit dialog box?  Right now if it is selected and I type attedit it removes the selection and asks me to select a block.  Is there any way around this?  i KNOW THERE IS THE PICKFIRST VARIABLE BUT i DON'T THINK IT WORKS FOR ATTRIBUTES. (UUGGGHHH DANG CAPS!!!)
Title: Re: Edit a selected attribute?
Post by: nivuahc on December 31, 2005, 12:31:10 PM
we talking noun/verb selection?

I think I put something together a while back, just to see if I could... but it would be at work. If you can hold out until January 3rd, I might be able to help you there ;)


(though it's quite possible I'm mistaken)  :laugh:
Title: Re: Edit a selected attribute?
Post by: whdjr on December 31, 2005, 12:36:15 PM
noun/verb selection seems to be the same as turning the pickfirst variable off.  Your here but not working...you guys have it easy over there.  We haven't had our time off yet...we're still trying to finish this current job...should finish today though. :-)
Title: Re: Edit a selected attribute?
Post by: nivuahc on December 31, 2005, 01:14:56 PM
it's Saturday Will. :-o

Hope you get yer project done soon!

And remember, if all else fails, just blame it on Electrical ;)
Title: Re: Edit a selected attribute?
Post by: whdjr on December 31, 2005, 01:30:24 PM
Yeah...Electrical with Mickeystation... :-)
Title: Re: Edit a selected attribute?
Post by: CAB on December 31, 2005, 01:48:17 PM
Something like this?
No error checking!
Code: [Select]
(defun c:myattedit (/ ss)
  (if (setq ss (cadr (ssgetfirst)))
    (if (> (sslength ss) 1)
      (prompt "\nError, too many selectd.")
      (progn (initdia)
             (command "attedit" (ssname ss 0))
             (princ)
      )
    )
    (progn (initdia)
           (command "attedit")
    )
  )
)
Title: Re: Edit a selected attribute?
Post by: whdjr on January 01, 2006, 04:48:40 PM
I think that works CAB.  I guess I would need to my attedit command to calls this routine insted.

Thanks,
Title: Re: Edit a selected attribute?
Post by: CAB on January 01, 2006, 05:00:05 PM
Yes, if you mean redefine the attedit command.

You did see this thread?
http://www.theswamp.org/forum/index.php?topic=6741.msg83217#msg83217