Author Topic: Selecting objects before running Lisps  (Read 2474 times)

0 Members and 1 Guest are viewing this topic.

AVCAD

  • Guest
Selecting objects before running Lisps
« on: November 05, 2004, 11:37:21 AM »
Ok, I wanted to use the GATTE (express tools) command in a list file.

I want to beable to select the objects before running the comman the though.

Is there a way to select the objects and like hold them in a selection set so that when the command asks for the object it can refer to that set of objects.

Quote

Command: gatte

Select block or attribute [Block name]:
Block: SMW-RD   Attribute tag: SYM
Enter new text: av

Number of inserts in drawing = 8  Process all of them? [Yes/No] <Yes>: n

Select objects: 1 found

Select objects: 1 found, 2 total

Select objects: 1 found, 3 total

Select objects: 1 found, 4 total

Select objects:

Please wait...
4 attributes changed.


Basically I dont want to go through selecting the objects at the "Select Objects" section.

Thanks.

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Selecting objects before running Lisps
« Reply #1 on: November 05, 2004, 11:43:11 AM »
Sorry dont have any time here, but...

Look here: http://www.theswamp.org/se7en/
And take a gander at the last two funcitons in the list for grabbing items already selected on the screen before your progy runs.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

AVCAD

  • Guest
Selecting objects before running Lisps
« Reply #2 on: November 05, 2004, 12:08:02 PM »
I cant ge that Lisp to work. I load it up but the command doesnt do anything.

It seems that this is what I am looking for though so any help would be great.

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Selecting objects before running Lisps
« Reply #3 on: November 05, 2004, 01:22:09 PM »
What are you talking about 'it dosent work?' Of course it works.  ...hold on.

...Ok, I re-red your initial post. (Actualy i didnt fully read it before hand but i read it now though) You cant pass values to a procedure if the procedure dosent have any formal parameters.  -e.g.

(defun c:my_main_procdure ()
 ... <code> ...

As you can see i cant pass anything to this procedure cause that functionality isnt built into it.

A prebilt express tool most likely isnt gonna be able to suport an argument. so... in short, you cant use my procedures that way. You would have to build your own "gatte" procedure.  

Does this make sence?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org