Author Topic: A diversion for the recreationally challenged.  (Read 35509 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: A diversion for the recreationally challenged.
« Reply #15 on: November 05, 2010, 07:22:23 AM »
I remember spending about 20 min trying to figure out the syntax for ACET-STR-FORMAT.

Side note: The bad thing about having a wireless mouse is that there is no cable to rip out when you're frustrated.

at least that one (ACET-STR-FORMAT) is listed in acetutil.chm

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.

JohnK

  • Administrator
  • Seagull
  • Posts: 10640
Re: A diversion for the recreationally challenged.
« Reply #16 on: November 05, 2010, 10:37:16 AM »
idea?

Everyone pick a util and write a replacement?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: A diversion for the recreationally challenged.
« Reply #17 on: November 05, 2010, 11:41:39 AM »
idea?

Everyone pick a util and write a replacement?
I like the idea.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: A diversion for the recreationally challenged.
« Reply #18 on: November 05, 2010, 11:56:16 AM »
idea?

Everyone pick a util and write a replacement?
I like the idea.

My lame attempt from last year some time:

http://www.theswamp.org/index.php?topic=28895.0

Oak3s

  • Guest
Re: A diversion for the recreationally challenged.
« Reply #19 on: November 05, 2010, 04:02:12 PM »
Great idea!
I will watch :)

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: A diversion for the recreationally challenged.
« Reply #20 on: November 05, 2010, 05:59:48 PM »
Was bored, so here is my quick version of acet-ss-zoom-extents  :-)

Code: [Select]
(defun swamp-ss-zoom-extents ( ss / bb )
  ;; © Lee Mac 2010

  ;; (swamp-ss-zoom-extents <SelectionSet>)
  ;; Purpose: Zooms to the Extents of a SelectionSet
  ;; Arguments:
  ;; ss: SelectionSet
  ;; Returns:  
  ;; List of LowerLeft, UpperRight of SSBoundingBox
  
  (
    (lambda ( i / e ll ur )
      (while (setq e (ssname ss (setq i (1+ i))))
        (vla-getBoundingBox (vlax-ename->vla-object e) 'll 'ur)

        (setq bb (cons (vlax-safearray->list ll)
                       (cons (vlax-safearray->list ur) bb))
        )
      )
    )
    -1
  )
  (
    (lambda ( result )
      (apply 'vla-ZoomWindow (cons (vlax-get-acad-object) (mapcar 'vlax-3D-point result)))
      result
    )
    (mapcar
      (function
        (lambda ( operation ) (apply 'mapcar (cons operation bb)))
      )
     '(min max)
    )
  )
)

And perhaps acet-ss-to-list (yeah I'm just picking the easier ones!)

Code: [Select]
(defun swamp-ss-to-list ( ss )
  ;; © Lee Mac 2010

  ;; (swamp-ss-to-list <SelectionSet>)
  ;; Purpose: Returns list of entity names contained in a SelectionSet
  ;; Arguments:
  ;; ss: SelectionSet
  ;; Returns:
  ;; List of Entity Names

  (
    (lambda ( i / e l )
      (reverse
        (while (setq e (ssname ss (setq i (1+ i))))
          (setq l (cons e l))
        )
      )
    )
    -1
  )
)

Couldn't resist these three:

Code: [Select]
;; (swamp-dtor <degrees>)
;; Purpose: Converts Degrees to Radians
;; Arguments:
;; d: Real Number representing an angle in Degrees
;; Returns:
;; Real Number representing an angle in Radians

(defun swamp-dtor ( d ) (* pi (/ d 180.0)))

Code: [Select]
;; (swamp-rtod <radians>)
;; Purpose: Converts Radians to Degrees
;; Arguments:
;; r: Real Number representing an angle in Radians
;; Returns:
;; Real Number representing an angle in Degrees

(defun swamp-rtod ( r ) (* 180.0 (/ r pi)))

Code: [Select]
;; (swamp-dxf <key> <elist>)
;; Purpose: Returns the association of key in a dxf association list
;; Arguments:
;; key: integer
;; elist: dxf association list (as returned by entget)

(defun swamp-dxf ( key elist ) (cdr (assoc key elist)))

Code: [Select]
;; (swamp-ss-redraw <SelectionSet> <Mode>)
;; Purpose: Redraws the supplied SelectionSet
;; Arguments:
;; ss  : SelectionSet
;; mode: redraw mode (1=show, 2=hide, 3=highlight, 4=unhighlight)
;; Returns: nil

(defun swamp-ss-redraw ( ss mode )
  (
    (lambda ( i / e )
      (while (setq e (ssname ss (setq i (1+ i))))
        (redraw e mode)
      )
    )
    -1
  )
)

:lol:
« Last Edit: November 05, 2010, 08:07:59 PM by Lee Mac »

Oak3s

  • Guest
Re: A diversion for the recreationally challenged.
« Reply #21 on: November 05, 2010, 06:05:11 PM »
I didnt look up what the added benefit would be to use acet-ss-zoom-extents so this question might be unreasonable but:
Could any alternatives be presented with some sort of documentation explaining what it does, returns...and maybe how...as this is the frustration with acet***...lack of documentation. At least that is my frustration.

*Edited by Oak3s 11.5.10

Thank you Lee for the documentation!!!
« Last Edit: November 05, 2010, 08:07:15 PM by Oak3s »

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: A diversion for the recreationally challenged.
« Reply #22 on: November 05, 2010, 06:10:15 PM »
I didnt look up what the added benefit would be to use acet-ss-zoom-extents so this question might be unreasonable but:
Could any alternatives be presented with some sort of documentation explaining what it does, returns...and maybe how...as this is the frustration with acet***...lack of documentation. At least that is my frustration.

Haha true, I still haven't give any documentation  :lol:

Oak3s

  • Guest
Re: A diversion for the recreationally challenged.
« Reply #23 on: November 05, 2010, 06:15:57 PM »
After reading what I posted I want to just make the comment that I appreciate all the help and knowledge that has been given/shared on this forum. Lee, I have read and followed much of your material and would not want in anyway to ask for more without you and others knowing that what has been presented is a gift and received as such. By asking for more I am in no way down playing the efforts that were put forth. Thank you very much...all of you.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: A diversion for the recreationally challenged.
« Reply #24 on: November 05, 2010, 06:18:25 PM »
After reading what I posted I want to just make the comment that I appreciate all the help and knowledge that has been given/shared on this forum. Lee, I have read and followed much of your material and would not want in anyway to ask for more without you and others knowing that what has been presented is a gift and received as such. By asking for more I am in no way down playing the efforts that were put forth. Thank you very much...all of you.

You're very welcome Oak3s, I'm glad that you can benefit from the stuff I post  :-)

Don't worry, I wouldn't write this stuff if I didn't enjoy it  8-)
« Last Edit: November 05, 2010, 06:27:24 PM by Lee Mac »

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: A diversion for the recreationally challenged.
« Reply #25 on: November 05, 2010, 06:25:43 PM »
Don't worry, I would write this stuff if I didn't enjoy it  8-)
lol
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Oak3s

  • Guest
Re: A diversion for the recreationally challenged.
« Reply #26 on: November 05, 2010, 06:26:43 PM »
I caught that too.  :-D

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: A diversion for the recreationally challenged.
« Reply #27 on: November 05, 2010, 06:27:49 PM »
Don't worry, I would write this stuff if I didn't enjoy it  8-)
lol

Hahahaha  :lol:

T.Willey

  • Needs a day job
  • Posts: 5251
Re: A diversion for the recreationally challenged.
« Reply #28 on: November 05, 2010, 07:39:41 PM »
Maybe the library should have a different prefix?  Maybe instead of ' acet ' use ' swamp ', or something.   :-D
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: A diversion for the recreationally challenged.
« Reply #29 on: November 05, 2010, 07:56:11 PM »

yeah,
the same with using VLA- for home built methods ... confuses me.  :|
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.