Author Topic: Challenge (semi advanced) ...  (Read 8589 times)

0 Members and 1 Guest are viewing this topic.

SMadsen

  • Guest
Challenge (semi advanced) ...
« Reply #15 on: February 11, 2005, 08:36:42 AM »
Nice work, Mr. Puckett. Worthy of a "McCarthy award" :)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Challenge (semi advanced) ...
« Reply #16 on: February 11, 2005, 08:57:17 AM »
impressive indeed ... my head hurts now ... I don't think I have ever seen a piece of code written quite like that....

I'll not post my feeble effort ...
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

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Challenge (semi advanced) ...
« Reply #17 on: February 11, 2005, 11:10:03 AM »
Quote from: SMadsen
Nice work, Mr. Puckett. Worthy of a "McCarthy award" :)

Not really, but thank you Mr. Madsen!
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Challenge (semi advanced) ...
« Reply #18 on: February 11, 2005, 11:11:21 AM »
Quote from: Keith
I'll not post my feeble effort ...

Since when have you penned a "feeble effort"? Go ahead and post it man, everyone has cool ideas.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Challenge (semi advanced) ...
« Reply #19 on: February 11, 2005, 03:07:02 PM »
Does this count?
Code: [Select]

(defun vp-coords (/ v2l gavp)

  (defun v2l (var)
    (vlax-safearray->list
      (vlax-variant-value var)
      )
    )

  (defun gavp ()
    (vla-get-activeviewport
      (vla-get-activedocument
        (vlax-get-acad-object)
        )
      )
    )

  (list
    (list
      (-
        (car (v2l (vla-get-center (gavp))))
        (/ (vla-get-width (gavp)) 2)
        )
      (-
        (cadr (v2l (vla-get-center (gavp))))
        (/ (vla-get-height (gavp)) 2)
        )
      )

    (list
      (+
        (car (v2l (vla-get-center (gavp))))
        (/ (vla-get-width (gavp)) 2)
        )
      (+
        (cadr (v2l (vla-get-center (gavp))))
        (/ (vla-get-height (gavp)) 2)
        )
      )
    )
  )
TheSwamp.org  (serving the CAD community since 2003)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Challenge (semi advanced) ...
« Reply #20 on: February 11, 2005, 03:15:45 PM »
Try it from paperspace (tilemode = 0, cvport = 1).
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Challenge (semi advanced) ...
« Reply #21 on: February 11, 2005, 03:21:38 PM »
Oh ............ back to the drawing board. :D
TheSwamp.org  (serving the CAD community since 2003)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Challenge (semi advanced) ...
« Reply #22 on: February 11, 2005, 03:22:52 PM »
You'll get it. :)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst