Author Topic: What "function" are you working on now?  (Read 6412 times)

0 Members and 2 Guests are viewing this topic.

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
What "function" are you working on now?
« on: March 02, 2006, 04:48:54 PM »
I spend alot of time working on / studing " simple " procedures/functions till I find their true identy. Yesterday and today I spent quite a bit of time studing the use of unnamed vs named procedures inside a main procedure. (Namely ``lambda'' vs ``defun'') Tomorow I think I will try to tackle ``eval'' and ``apply'' and how they work. (More specificaly, how symbols and expressions are evaluated.)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: What "function" are you working on now?
« Reply #1 on: March 02, 2006, 05:01:41 PM »
data import/export function for traffic engineering
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: What "function" are you working on now?
« Reply #2 on: March 02, 2006, 05:16:55 PM »
Saving selections sets across drawing sessions.  Making them avalible for use days later (forever if need be).  It is also a learning episode, dictionaries, xrecord storage/ retrieval etc.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: What "function" are you working on now?
« Reply #3 on: March 02, 2006, 05:22:48 PM »
I thought the question was rhetorical ..

but, OK ;

Validating XRecord Data against a DataBase.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: What "function" are you working on now?
« Reply #4 on: March 02, 2006, 05:29:05 PM »
More than I can list, but the two front burner items are: Application that prioritizes select windows processes for client #1 and writing a Plant Software Selection and Implementation Plan for client #2.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

hendie

  • Guest
Re: What "function" are you working on now?
« Reply #5 on: March 03, 2006, 03:47:43 AM »
data import/export function for traffic engineering and keeping Keith on the right track  :lol:

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: What "function" are you working on now?
« Reply #6 on: March 03, 2006, 05:08:57 AM »
  • R&I bidirectional interface AutoCAD <> database. (VBA)
  • ObjectDBX project to normalize different headers (stamps) of a few thousand drawings to one type.
  • Including renaming attribute tags and merging some values. The modification profiles are from an
    excel file. Process results are written into a log file. (VisualLISP)
  • ObjectDBX project to change the URL in a hyperlink in a few hundred drawings. (VisualLISP)
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: What "function" are you working on now?
« Reply #7 on: March 03, 2006, 07:55:17 AM »
>Se7en

I think, after translation, these functions are identical!
Code: [Select]
(mapcar '1+ lst)

(defun rec_1+ (lst)
  (if lst
    (cons (1+ (car lst))
      (rec_1+ (cdr lst))
    ) ;_  cons
  ) ;_  if
)

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
Re: What "function" are you working on now?
« Reply #8 on: March 03, 2006, 09:48:58 AM »
>Se7en

I think, after translation, these functions are identical!
Code: [Select]
(mapcar '1+ lst)

(defun rec_1+ (lst)
  (if lst
    (cons (1+ (car lst))
      (rec_1+ (cdr lst))
    ) ;_  cons
  ) ;_  if
)

Yes, that is my understanding too.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

LE

  • Guest
Re: What "function" are you working on now?
« Reply #9 on: March 03, 2006, 11:42:34 AM »
I am getting back into the geometry world, to update one of my apps, to have some more abilities, first to get the calculation of the centroid/geometric center, implementation of a hoover alike [there is one class AcEdInputPointMonitor but does not work for what I need], I need to have all the closed polylines, one into each other and pass, the cursor and while is inside of the polyline, to provide the appropriate information, or to open an excel or table object and have that info/properties available... among other things...

le.

Jim Yadon

  • Guest
Re: What "function" are you working on now?
« Reply #10 on: March 04, 2006, 12:55:08 PM »
A complete rewrite of all the tools I wrote in LISP so long ago. Namely to add variables where I have constants to allow for user level control of certain functions. As well as build in a few more error traps. With that in mind, what is the preferred method of long term variable storage among you all?

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: What "function" are you working on now?
« Reply #11 on: March 04, 2006, 02:03:16 PM »
Excuse! I - not correctly interpreted title of a subject. (What "function" are you working on now?)
my work - optimal cutting...
http://www.rusparquet.com/

David Bethel

  • Swamp Rat
  • Posts: 656
Re: What "function" are you working on now?
« Reply #12 on: March 04, 2006, 03:35:43 PM »
As to (eval) and (apply), these are pretty much interchangeable calls:

Code: [Select]
   (apply '+ '(2 3 4))

   (eval (cons '+ '(2 3 4)))


It also works well with 'min 'max as well as the basic math functions.

My latest attempt, not my first at it and still not comprhending is the (boole) function.  -David

R12 Dos - A2K

CADaver

  • Guest
Re: What "function" are you working on now?
« Reply #13 on: March 05, 2006, 02:06:13 PM »
just getting a little time to clean up old functions

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
Re: What "function" are you working on now?
« Reply #14 on: March 28, 2006, 09:49:58 AM »
As to (eval) and (apply), these are pretty much interchangeable calls:

Code: [Select]
   (apply '+ '(2 3 4))

   (eval (cons '+ '(2 3 4)))


It also works well with 'min 'max as well as the basic math functions.

My latest attempt, not my first at it and still not comprhending is the (boole) function.  -David

David, have you read Stigs paper on binary and autocad. I think it will give you some great ideas with Boole.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

RbtDanforth

  • Guest
Re: What "function" are you working on now?
« Reply #15 on: March 28, 2006, 09:02:48 PM »
Long ago when lisp would not survive a plot, much less from drawing to drawing, I had it write little ASCII files ie. data.asc where the first line was variable a the next b etc.

It would them write a script that would plot the drawing and go to the next drawing in a list that was saved on another ASCII file, the script was then set to load and run the lisp function that would write another script file etc.

Since it always overwrote the previous information there was not a clutter of little ASCII files, and if it crashed, the last ASCII file could take over where things were left off. I also had an ASCII file with the standard info that went on the border so that was updated correctly in the process. In those days I could plot a hundred drawings with a single command :-D Changes in the way Autocad works has made that system a buggy whip, but it was fun while it lasted.

I did use that system to extract or fill out Bill of Materials lists and to hunt for specific elevation  blocks by picking the text of their number on the plan. By using space delimited text files it was simple to grab the line of text and pick out the text from point a to b.

To store info in a drawing, an invisible block with invisible attributes works pretty well as long as the info is well defined and hopefully short. I suppose there are more elegant ways but that would be my quick and dirty style.

As for my current problems, I am trying to do a workaround for a Mtext wipeout bug. Instead of hiding what is behind it creates a dark box of its own ( not the #63 color) hiding the text. A bit of experimenting shows up a set of codes that read when the wipeout is on but not when the wipeout is off. Now I have #s 45 and 63 understood but 90, 421, and 441 are a bit confusing.

If I set 90 to 2, the messed up text, the problem (and the wipeout) goes away, at 1 it goes to color stored in #63 and whether messed up of not 90 seems to be set at 3 when ever by background is set. Autocad doesn't seem to accept 0 or any number higher than 3.

When set at 2 the Assoc's 45, 63, 90, 421, & 441 still show which tells me that 2 is not a right setting. If someone has a solution that will quickly solve the problem, I would like to here it.