Author Topic: Ellipses to polylines  (Read 24489 times)

0 Members and 1 Guest are viewing this topic.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Ellipses to polylines
« Reply #30 on: November 18, 2011, 08:36:14 PM »
not at all
your code never ceases to amaze.

Sorry for my misinterpretation. Thank you but I can't take credit for the defun redef technique, I believe Jon Fleming or Tony Tanzillo first did it, probably 437 years ago.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Ellipses to polylines
« Reply #31 on: November 18, 2011, 08:38:33 PM »
< ... > probably 437 years ago.

I remember that day, it was a Tuesday.
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.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Ellipses to polylines
« Reply #32 on: November 18, 2011, 09:14:17 PM »
not at all
your code never ceases to amaze.

Sorry for my misinterpretation. Thank you but I can't take credit for the defun redef technique, I believe Jon Fleming or Tony Tanzillo first did it, probably 437 years ago.
:) Well, it's impressive and I thank you regardless.

I borrowed this idea from gile a few years back (slightly modified from his original version that set commands for each view):
Code: [Select]
(foreach radius '(0 1 2 3 4 5 6 7 8 9)
  ;; Fillet with radius (0-9)
  (eval (list 'defun
              (if (zerop radius)
                'c:FF
                (read (strcat "c:F" (itoa radius)))
              )
              nil
              (list 'setvar "filletrad" radius)
              (list 'princ (strcat "\nFillet radius set to: " (rtos radius)))
              (list 'command "_.fillet")
              '(princ)
        )
  )
)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Ellipses to polylines
« Reply #33 on: November 18, 2011, 09:30:29 PM »
Well, it's impressive and I thank you regardless.

I borrowed this idea from gile a few years back ...

You're welcome. Gile's stuff is always top shelf. Many variants of that technique abound, here's another from awhile back ...

Code: [Select]
...
(eval
    (cons 'defun
        (list 'GetAlignment '( value )
            (cons 'cdr
                (list
                    (list 'assoc 'value
                        (list 'quote lst)
                    )
                )
            )   
        )
    )
)

:)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Ellipses to polylines
« Reply #34 on: November 18, 2011, 09:39:05 PM »
Well, it's impressive and I thank you regardless.

I borrowed this idea from gile a few years back ...

You're welcome. Gile's stuff is always top shelf. Many variants of that technique abound, here's another from awhile back ...

HaHa, I remember that thread. Learned quite a bit that day. :)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Ellipses to polylines
« Reply #35 on: November 18, 2011, 09:59:38 PM »
HaHa, I remember that thread. Learned quite a bit that day. :)

some threads are really fun to start :)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Ellipses to polylines
« Reply #36 on: November 19, 2011, 07:46:04 AM »

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Ellipses to polylines
« Reply #37 on: November 19, 2011, 02:39:06 PM »
Hi,

About ObjectId and 64 bits platforms, from what I read somewhere (I don't remember where) the ObjectId32, OwnerId32 and ObjectIdToObject32 properties and method are only requiered for VBA on 64 bits platforms. By my side I never noticed problems using the 'old' unsuffixed ones with LISP on acad 2010, 2011 and 2012 64 bits (but I do not use as LISP routines as I did).

Another thing, using the "platform" sysvar evaluates the Windows platform version, not the AutoCAD version. On a windows 7 64 bits, I have an AutoCAD 2007 32 bits installed and (getvar 'platform) returns "Microsoft Windows NT Version 6.1 (x64)".
To evaluate the AutoCAD paltform version I'd rather evaluate if ObjectId32 is available :

Code: [Select]
(defun gc:IsAcad64   ()
  (vlax-property-available-p
    (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-acad-object)))
    'ObjectId32
  )
)

Speaking English as a French Frog

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Ellipses to polylines
« Reply #38 on: November 19, 2011, 03:01:57 PM »
Great info. Maybe my system needed it because I installed vba on on it. Have to do some investigating. Nonetheless, your info is appreciated, especially the heads up about using the platform sysvar, thank you very much Giles.

And Lee: I never saw your GrText suite before, awesome work.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Ellipses to polylines
« Reply #39 on: November 20, 2011, 07:29:51 AM »
And Lee: I never saw your GrText suite before, awesome work.

Cheers Michael  :-)

VVA

  • Newt
  • Posts: 166
Re: Ellipses to polylines
« Reply #40 on: November 22, 2011, 12:58:42 AM »
Another version
;;; http://forum.dwg.ru/showthread.php?t=31568
Code: [Select]
(defun Acad64Bit-version ()
  (vl-load-com)
  (> (strlen (vl-prin1-to-string (vlax-get-acad-object))) 40)
)