Jump to content

Lisp routine.. I think is what i need


JON PETERS

Recommended Posts

first i would like to thank all that take the time to answer....

 

I am looking for a LISP Routine (i think) that would creat a chart/table when you select your blocks and it would run a check for each column. putting a (-) if the block was not selected and placeing a (x) if it was selected.

 

we design aircraft layouts for airports and as of now we would create a table. across the top you would have gate #'s and down the left side you would have the aircraft models. we would place a (-) if the aircraft does not park there and we would place a (x) if it does....some what time consuming.

 

would a lisp routine help? and if so is it possible to create one to do this command.

 

thanks for your time.

Link to comment
Share on other sites

Welcome to CADTutor!

 

The short answer is, Yes.

 

Unfortunately, this is not something I *believe* someone else has already written, and it may be need to be created. Are you adept at writing LISP by chance?

 

If not, this may be a large task for someone else... especially if they are not a member of your industry. More information, block names, proximity parameters (are the aircraft blocks inserted near the gate, on the gate, etc.), perhaps even a sample drawing will be needed.

 

Also, given that this may be created from scratch, you really need to provide a clear description of exactly what you the routine to do, step-by-step.

 

Hope this helps!

Link to comment
Share on other sites

render thanks for your reply.

 

sorry i have no knowledge at all on how to write lisp routines.

 

as for a step-by-step i am looking for something like this:

 

1. zoom in to a aircraft gate. (we'll call this gate A8 as for it will match the sample drawing)

 

2. type in command to start lisp

 

3. would like a prompt to pop up to label gate # (A8)

 

4. select all aircraft that are parked at gate A8

 

5. repeat steps 3-4 for other gates (such as A10 and A12)

 

6. have chart auto fill placing (-) to indicate that aircraft is not at gate and (x) for aircraft that is parked at gate.

 

 

 

AP02.dwg

Link to comment
Share on other sites

The aircraft are dragged and dropped from design center. placed on a stop mark and rotated to align on the Lead-In line (the Yellow line on the sample drawing with the gate number labeled at the end of it)

all the aircraft are brought in this way. and all align the same way, but not always on the same stop mark.

Link to comment
Share on other sites

I have already started to put something together for this (for you), but I have some work to get done first. :roll:

 

Stay tuned... same Bat-channel, same Bat-time. LoL

Link to comment
Share on other sites

How's your lisp coming Renderman?

 

It's coming along awesome!

 

I've got this snazzy intro' date=' and end... it's the middle I've not had time to finish:

 

[color=red](defun c:FOO ()[/color]
 [color=seagreen];;<-- Working on this part[/color]
 [color=blue](princ))[/color]

 

LoL

 

Seriously though, I regret that I've not yet finished this... Work is really hectic right now.

 

Labeling the gates is no problem, it's programmatically selecting the airplanes shown for said gate without (ssget '((0 . "INSERT") ...)). There's no intelligence in the line work for the wheel blocks, or parking bay limits, etc. If the OP was OK with manually cross-selecting the applicable airplanes this would be simpler.

 

... Then there's the table to create.

 

I just don't have the time for this (right now), unfortunately.

Link to comment
Share on other sites

RenderMan,

 

 

thanks again for tinkering with this lisp routine. totally understand that you dont have the time to create this. i appreciate all your help . and i would be alright with manually cross-selecting the aircraft blocks.

 

i will stay tuned to the same bat channel LOL

 

have a good one

Link to comment
Share on other sites

RenderMan,

 

 

thanks again for tinkering with this lisp routine. totally understand that you dont have the time to create this. i appreciate all your help . and i would be alright with manually cross-selecting the aircraft blocks.

 

i will stay tuned to the same bat channel LOL

 

have a good one

 

I am sorry for keeping you waiting like this... here's something written quickly to at least get you started:

 

(defun c:GL () (c:GateLabel))
(defun c:GateLabel ( / gate airline pt)
 (if (and (setq gate (getstring T "\nEnter gate number: "))
          (setq airline (getstring T "\nEnter airline: "))
          (setq pt (getpoint "\nSpecify point for text placement: ")))
   (command "._-mtext" pt "justify" "_tc" pt gate airline "")
   (cond (airline (prompt "\n** Must specify a point ** "))
         (gate (prompt "\n** Must enter an airline ** "))
         ((prompt "\n** Must enter a gate number ** "))))
 (princ))

HTH

Link to comment
Share on other sites

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