Author Topic: I think my brain went on vacation  (Read 8059 times)

0 Members and 1 Guest are viewing this topic.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
I think my brain went on vacation
« Reply #15 on: February 15, 2005, 03:54:21 PM »
Quote from: <spell check police>
"You are a" or "You're a", but not "your a".

<spank.mpg>

ROTFLMAO .................  :lol:

man that was good........ I haven't laughed like that in months.
TheSwamp.org  (serving the CAD community since 2003)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I think my brain went on vacation
« Reply #16 on: February 15, 2005, 04:03:40 PM »
Quote from: Mark Thomas
Quote from: <spell check police>
"You are a" or "You're a", but not "your a".

<spank.mpg>

ROTFLMAO .................  :lol:

man that was good........ I haven't laughed like that in months.

I thought it was funny too but didn't laugh too hard
because they will be after me next. :horror:
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

dubb

  • Swamp Rat
  • Posts: 1105
I think my brain went on vacation
« Reply #17 on: February 15, 2005, 04:24:14 PM »
Quote from: Se7en
hummm?! Hey while i have your attention officer; Could you tell me if i spelled this right?

BAN!!!


omg..is there really a spell check police?

PDJ

  • Guest
I think my brain went on vacation
« Reply #18 on: February 15, 2005, 06:34:04 PM »
Alright CAB, I tried your way, coulda sworn I checked it with just a few and now that I have all the villages loaded, it doesn't work.. Take a look if you will and see if you see any glaring errors.  Main thing I did is change the name from xld to xx and added all those dang villages.  FYI, the T: is a network drive but, I don't think that's a problem.

Code: [Select]
(defun c:xx (/ ac_list ac filen tmp)
  (setq ac_list
       (list
         (list "231" "T:\\PRM\\Birch Creek\\221OA.DWG")
         (list "237" "T:\\PRM\\newtokk\\237oa.DWG")
         (list "238" "T:\\PRM\\alakanuk\\238oa.DWG")
         (list "256" "T:\\PRM\\tuntutuliak\\256oa.DWG")
         (list "293" "T:\\PRM\\nikolai\\293oa.DWG")
         (list "295" "T:\\PRM\\livengood\\295oa.DWG")
         (list "298" "T:\\PRM\\takotna\\298oa.DWG")
         (list "358" "T:\\PRM\\rampart\\358oa.DWG")
         (list "427" "T:\\PRM\\toksook bay\\427oa.DWG")
         (list "438" "T:\\PRM\\st marys\\438oa.DWG")
         (list "467" "T:\\PRM\\chuathbaluk\\467oa.DWG")
         (list "477" "T:\\PRM\\kasigluk\\477oa.DWG")
         (list "478" "T:\\PRM\\stevens village\\478oa.DWG")
         (list "493" "T:\\PRM\\togiak\\493oa.DWG")
         (list "496" "T:\\PRM\\nunam iqua\\496oa.DWG")
         (list "520" "T:\\PRM\\central\\520oa.DWG")
         (list "524" "T:\\PRM\\mcgrath\\524oa.DWG")
         (list "525" "T:\\PRM\\twin hills\\525oa.DWG")
         (list "526" "T:\\PRM\\lime village\\526oa.DWG")
         (list "527" "T:\\PRM\\nunapitchuk\\527oa.DWG")
         (list "536" "T:\\PRM\\eek\\536oa.DWG")
         (list "543" "T:\\PRM\\bethel\\543oa.DWG")
         (list "549" "T:\\PRM\\pilot station\\549oa.DWG")
         (list "553" "T:\\PRM\\atmautluak\\553oa.DWG")
         (list "556" "T:\\PRM\\quinhagak\\556oa.DWG")
         (list "557" "T:\\PRM\\kongiganak\\557oa.DWG")
         (list "558" "T:\\PRM\\scammon bay\\558oa.DWG")
         (list "573" "T:\\PRM\\chenega bay\\573oa.DWG")
         (list "584" "T:\\PRM\\russian mission\\584oa.DWG")
         (list "587" "T:\\PRM\\arctic village\\587oa.DWG")
         (list "588" "T:\\PRM\\kwigillingok\\588oa.DWG")
         (list "589" "T:\\PRM\\napakiak\\589oa.DWG")
         (list "591" "T:\\PRM\\mt village\\591oa.DWG")
         (list "624" "T:\\PRM\\unalakleet\\624oa.DWG")
         (list "628" "T:\\PRM\\beaver\\628oa.DWG")
         (list "647" "T:\\PRM\\nightmute\\647oa.DWG")
         (list "652" "T:\\PRM\\tununak\\652oa.DWG")
         (list "672" "T:\\PRM\\manley hs\\672oa.DWG")
         (list "674" "T:\\PRM\\l minchumina\\674oa.DWG")
         (list "679" "T:\\PRM\\marshall\\679oa.DWG")
         (list "695" "T:\\PRM\\tuluksak\\695oa.DWG")
         (list "737" "T:\\PRM\\napaskiak\\737oa.DWG")
         (list "757" "T:\\PRM\\kwethluk\\757oa.DWG")
         (list "758" "T:\\PRM\\hooper bay\\758oa.DWG")
         (list "765" "T:\\PRM\\akiak\\765oa.DWG")
         (list "798" "T:\\PRM\\minto\\798oa.DWG")
         (list "825" "T:\\PRM\\akiachak\\825oa.DWG")
         (list "827" "T:\\PRM\\mekoryuk\\827oa.DWG")
         (list "848" "T:\\PRM\\chalkyitsik\\848oa.DWG")
         (list "849" "T:\\PRM\\venetie\\849oa.DWG")
         (list "858" "T:\\PRM\\chevak\\858oa.DWG")
         (list "867" "T:\\PRM\\chefornak\\867oa.DWG")
         (list "896" "T:\\PRM\\kipnuk\\896oa.DWG")
         (list "899" "T:\\PRM\\kotlik\\899oa.DWG")
         (list "949" "T:\\PRM\\emmonak\\949oa.DWG")
         (list "967" "T:\\PRM\\goodnews bay\\967oa.DWG")
         (list "979" "T:\\PRM\\platinum\\979oa.DWG")
         (list "984" "T:\\PRM\\savoonga\\984oa.DWG")
         (list "985" "T:\\PRM\\gambell\\985oa.DWG")
         )
  )
  (if (setq ac (getstring "\nEnter the area code for the project to load. "))
    (if (setq filen (assoc ac ac_list))
      (progn
        (setq filen (cdr filen))
         ;;  from Kerry Brown
        (if (setq tmp (findfile filen))
          (vla-activate
            (vla-open (vla-get-documents (vlax-get-acad-object)) tmp)
          )
          (alert (strcat "Can't find file : " filen))
        )
      )
      (alert (strcat filen " is not in the list."))
    )
  )
  (princ)
)
(prompt "\n***  XX loaded, enter XX followed by the area code to run [XX 321].")
(princ)


Thanks for the help guys and dolls!!

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I think my brain went on vacation
« Reply #19 on: February 15, 2005, 06:50:43 PM »
Sorry Paul
Change this:
Code: [Select]
(setq filen (cdr filen))
to this:
Code: [Select]
(setq filen (cadr filen))
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

TR

  • Guest
I think my brain went on vacation
« Reply #20 on: February 15, 2005, 07:16:15 PM »
Quote from: CAB
http://groups-beta.google <snip>


Make a bookmark in your browser and put the following for the path:

Code: [Select]
javascript:void(location.href='http://tinyurl.com/create.php?url='+location.href)

 :)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I think my brain went on vacation
« Reply #21 on: February 15, 2005, 07:47:49 PM »
Thanks Tim
I updated the post. :)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

PDJ

  • Guest
I think my brain went on vacation
« Reply #22 on: February 15, 2005, 08:12:55 PM »
Works like a charm now CAB.. Many thanks!

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I think my brain went on vacation
« Reply #23 on: February 15, 2005, 09:51:35 PM »
You're welcome.
Here is another version.
Code: [Select]
(defun c:xx (/ ac_list ac filen tmp)
  (setq ac_list
       (list
         (list "231" "Birch Creek")
         (list "237" "newtokk")
         (list "238" "alakanuk")
         (list "256" "tuntutuliak")
         (list "293" "nikolai")
         (list "295" "livengood")
         (list "298" "takotna")
         (list "358" "rampart")
         (list "427" "toksook bay")
         (list "438" "st marys")
         (list "467" "chuathbaluk")
         (list "477" "kasigluk")
         (list "478" "stevens village")
         (list "493" "togiak")
         (list "496" "nunam iqua")
         (list "520" "central")
         (list "524" "mcgrath")
         (list "525" "twin hills")
         (list "526" "lime village")
         (list "527" "nunapitchuk")
         (list "536" "eek")
         (list "543" "bethel")
         (list "549" "pilot station")
         (list "553" "atmautluak")
         (list "556" "quinhagak")
         (list "557" "kongiganak")
         (list "558" "scammon bay")
         (list "573" "chenega bay")
         (list "584" "russian mission")
         (list "587" "arctic village")
         (list "588" "kwigillingok")
         (list "589" "napakiak")
         (list "591" "mt village")
         (list "624" "unalakleet")
         (list "628" "beaver")
         (list "647" "nightmute")
         (list "652" "tununak")
         (list "672" "manley hs")
         (list "674" "l minchumina")
         (list "679" "marshall")
         (list "695" "tuluksak")
         (list "737" "napaskiak")
         (list "757" "kwethluk")
         (list "758" "hooper bay")
         (list "765" "akiak")
         (list "798" "minto")
         (list "825" "akiachak")
         (list "827" "mekoryuk")
         (list "848" "chalkyitsik")
         (list "849" "venetie")
         (list "858" "chevak")
         (list "867" "chefornak")
         (list "896" "kipnuk")
         (list "899" "kotlik")
         (list "949" "emmonak")
         (list "967" "goodnews bay")
         (list "979" "platinum")
         (list "984" "savoonga")
         (list "985" "gambell")
         )
        prefix "T:\\PRM\\"
        suffix "oa.DWG"
  )
  (if (setq ac (getstring "\nEnter the area code for the project to load. "))
    (if (setq filen (assoc ac ac_list))
      (progn
        (setq filen (strcat prefix (cadr filen) "\\" ac suffix ))
         ;;  from Kerry Brown
        (if (setq tmp (findfile filen))
          (vla-activate
            (vla-open (vla-get-documents (vlax-get-acad-object)) tmp)
          )
          (alert (strcat "Can't find file : " filen))
        )
      )
      (alert (strcat filen " is not in the list."))
    )
  )
  (princ)
)
(prompt "\n***  XX loaded, enter XX followed by the area code to run [XX 321].")
(princ)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
I think my brain went on vacation
« Reply #24 on: February 15, 2005, 10:47:38 PM »
Here's my quick 2¢ food for thought effort (untested) --

Code: [Select]
(defun c:xx
   
    (   /  
        areaCodes
        areaCode
        cityName
        fileName
        filePrefix
        fileSuffix
        filePath
        openedOK
    )

    (setq areaCodes
       '(
            ("231" . "Birch Creek")
            ("237" . "newtokk")
            ("238" . "alakanuk")
            ("256" . "tuntutuliak")
            ("293" . "nikolai")
            ("295" . "livengood")
            ("298" . "takotna")
            ("358" . "rampart")
            ("427" . "toksook bay")
            ("438" . "st marys")
            ("467" . "chuathbaluk")
            ("477" . "kasigluk")
            ("478" . "stevens village")
            ("493" . "togiak")
            ("496" . "nunam iqua")
            ("520" . "central")
            ("524" . "mcgrath")
            ("525" . "twin hills")
            ("526" . "lime village")
            ("527" . "nunapitchuk")
            ("536" . "eek")
            ("543" . "bethel")
            ("549" . "pilot station")
            ("553" . "atmautluak")
            ("556" . "quinhagak")
            ("557" . "kongiganak")
            ("558" . "scammon bay")
            ("573" . "chenega bay")
            ("584" . "russian mission")
            ("587" . "arctic village")
            ("588" . "kwigillingok")
            ("589" . "napakiak")
            ("591" . "mt village")
            ("624" . "unalakleet")
            ("628" . "beaver")
            ("647" . "nightmute")
            ("652" . "tununak")
            ("672" . "manley hs")
            ("674" . "l minchumina")
            ("679" . "marshall")
            ("695" . "tuluksak")
            ("737" . "napaskiak")
            ("757" . "kwethluk")
            ("758" . "hooper bay")
            ("765" . "akiak")
            ("798" . "minto")
            ("825" . "akiachak")
            ("827" . "mekoryuk")
            ("848" . "chalkyitsik")
            ("849" . "venetie")
            ("858" . "chevak")
            ("867" . "chefornak")
            ("896" . "kipnuk")
            ("899" . "kotlik")
            ("949" . "emmonak")
            ("967" . "goodnews bay")
            ("979" . "platinum")
            ("984" . "savoonga")
            ("985" . "gambell")
        )
    )
   
    (setq
        filePrefix "T:\\PRM\\"
        fileSuffix "oa.DWG"
    )  
   
    (setq areaCode
        (getstring
            (strcat
                "\nEnter the area code "
                "for the project to load. "
            )    
        )
    )

    (cond
   
        (  
            (and
       
                (setq cityName
                    (cdr
                        (assoc
                            areaCode
                            areaCodes
                        )
                    )
                )
           
                (setq fileName
                    (strcat
                        filePrefix
                        cityName
                        "\\"
                        areaCode
                        fileSuffix
                    )
                )
               
                (setq filePath
                    (findfile fileName)
                )
               
                ;;  compliments Kerry Brown; slight massage

                (   (lambda (result)
                        (setq openedOK
                            (null
                                (vl-catch-all-error-p result)
                            )
                        )
                    )
                    (vl-catch-all-apply
                       '(lambda()                                
                            (vla-activate
                                (vla-open
                                    (vla-get-documents
                                        (vlax-get-acad-object)
                                    )
                                    filePath
                                )
                            )
                        )
                    )
                )    
            )
        )
       
        (   (null cityName)
            (alert
                (strcat
                    "<" areaCode ">"
                    " is not a valid area code."
                )
            )
        )
       
        (   (null filePath)
            (alert
                (strcat
                    "Can't find file: "
                    fileName
                )
            )
        )
        (   (null openedOK)
            (alert
                (strcat
                    "Problem opening "
                    filePath
                    "."
                )
            )
        )
        (   t
            (princ "We're not sure what happened.")
        )
    )
   
    (princ)
   
)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst