Author Topic: Using a temporary computer & ACAD system?  (Read 11347 times)

0 Members and 1 Guest are viewing this topic.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Using a temporary computer & ACAD system?
« on: March 16, 2010, 11:44:49 PM »
Due to the economy I am going to take so temporary drafting work in my area.
Doing what I normally do but on another computer.
I have quite a few LISP routines I regularly use, a menu system, and my drawing variable set up.
On my computer I use acaddoc.lsp to run AlansAutoload.lsp which loads my lisp routines.
Also run ACADSet_Variables CAB.lsp which sets all the vars the way I like them.
My menu is already installed but in case something happens to it I have this routine to reload it.
Code: [Select]
(defun c:MyMenu()
  (command "menuunload" "CAB1")
  (command "menuload" "C:/CABs Menus/CAB1.mns")
  (menucmd "P17=+CAB1.POP1")
  (princ)
)
The question is how to make use of my favorites without leaving them on the temporary system?
Never having to do this before I would hope that I could use a thumb drive & add it to the ACAD path.
If they have a network will this be a problem?  Don't have any idea at this point what version of ACAD is in use.


List of things to have on the thumb drive:
My Lisp routines
Menu file
All ICONS, this will be a PITA gathering them up & making them work.

A lisp routine to run and do the set up for me. Or should I manually alter the system? (save profile & set my profile)

A lisp routine to restore the system & clean my stuff out. (restore profile)

So looking for ideas and suggestions. 
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Using a temporary computer & ACAD system?
« Reply #1 on: March 17, 2010, 12:04:39 AM »

Alan

I'd leave everything of yours on the thumbDrive.

Load all your autoStart stuff from your MNL file associated with your Menu.

In Options, add the thumbDrive folders as required. ( could be done from your autoload stuff < thats what I'd do anyway>)


the menu will load automatically if it's available ... after that it's all magic. :)

//-------------
great to hear you've picked up some extra :)
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.

matthewj

  • Newt
  • Posts: 42
  • Vanilla
Re: Using a temporary computer & ACAD system?
« Reply #2 on: March 17, 2010, 12:33:41 AM »
I used to use a thumbdrive much the same way at work a while ago.  But I never had it set up in such an automatic way.  You should be able to use AutoCAD's command line switches (/b & /p) to load a profile and/or startup script located on the thumbdrive.  I don't use custom icons, so I don't have enough experience to know this would meet those needs.

One problem with this, sometimes you don't know which drive letter windows will assign to a flash drive, this can make customizing some things a hassle.  I've been using the following script to take care of this problem.  Its a batch file that "mounts" the directory it is run in as drive Z:/.  Run it once to mount the directory, and run it again to remove the mount.

Code: [Select]
@echo off
if "%MAPX%"=="" setx mapx 0

:trial
if "%MAPX%"=="1" goto :unmapx
goto :mapx
goto :end

:mapx

echo Mapping drive Z:/
REM Map current directory to drive Z:
subst z: "%cd%"

setx MAPX 1

goto :end

:unmapx

echo Unmapping drive Z:/
REM move to a different directory
cd c:

REM unmap current drive z:
subst z: /d

setx MAPX 0

goto :end

:end

(This is totally not a commercial, but) I recently started using dropbox, an online synced storage, to share all of my acad customization files and profiles between my work and home computers.  It's been working like a charm for the past year or so.  Of course this would mean leaving a copy of the files on the work computer until you uninstalled the sync program.  (Which does not seem like it would fit your bill, but then again, it might.)  This might work out in a longer term temp position, but probably wouldn't be worth the hassle in a short term gig.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Using a temporary computer & ACAD system?
« Reply #3 on: March 17, 2010, 07:45:53 AM »
One thing is to load the support path to the icons BEFORE loading the menu so that they will show when the menu is loaded.  I typically run most of my development off of my thumb drive so that I can take it home and  use it there.

map a drive and use that mapped drive for all of you custom stuff, like matthewj said, leave it all on the thumb drive.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Using a temporary computer & ACAD system?
« Reply #4 on: March 17, 2010, 08:13:04 AM »
Thanks for all the advice.
I will test the setup on my system later today. 8-)
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.

JohnK

  • Administrator
  • Seagull
  • Posts: 10603
Re: Using a temporary computer & ACAD system?
« Reply #5 on: March 17, 2010, 08:45:43 AM »
Icons:
http://afralisp.net/vbaa/vbadll.htm
Use a dll. It's what i use.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Using a temporary computer & ACAD system?
« Reply #6 on: March 17, 2010, 09:16:51 AM »
That would be a great way to tidy up but figuring out which icons I need will be the trick as I have not been good at deleting the unused ones and some were stored in MyDocuments which contain other unwanted picture files.
Can-o-worms :oops:
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.

JohnK

  • Administrator
  • Seagull
  • Posts: 10603
Re: Using a temporary computer & ACAD system?
« Reply #7 on: March 17, 2010, 09:20:20 AM »
So toss them all in there (thats what i did *lol*).
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Using a temporary computer & ACAD system?
« Reply #8 on: March 17, 2010, 09:24:25 AM »
The question is how to make use of my favorites without leaving them on the temporary system?

If the underlying issue issue one of security I'd mount a pass worded truecrypt drive and then use a profile that utilizes same. However, I personally wouldn't worry too much about anyone ripping routines. As for dropbox, I'd be careful with services like that. Omnidrive used to be quite the rage, then *poof* they were gone, leaving a lot of people wailing and gnashing and calling for the developer's head.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Using a temporary computer & ACAD system?
« Reply #9 on: March 17, 2010, 10:08:34 AM »
Thanks Michael.
The only scenario I wish to avoid is leaving all my lisp files if I get a call that we no longer need your services.
So an unprotected thumb drive should do the trick.
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Using a temporary computer & ACAD system?
« Reply #10 on: March 17, 2010, 10:12:59 AM »
Kerry,
How do you run the MNL file?


I wish this was extra. The housing market is so bad I have no work. I have not been an employee since 1977. :-(
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.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Using a temporary computer & ACAD system?
« Reply #11 on: March 17, 2010, 10:13:56 AM »
Thanks Michael.
The only scenario I wish to avoid is leaving all my lisp files if I get a call that we no longer need your services.
So an unprotected thumb drive should do the trick.
Provided they allow you to use it.  Our IT department has USBs disabled (except for mice and keyboards).   :|
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

JCTER

  • Guest
Re: Using a temporary computer & ACAD system?
« Reply #12 on: March 17, 2010, 10:15:51 AM »
Thanks Michael.
The only scenario I wish to avoid is leaving all my lisp files if I get a call that we no longer need your services.
So an unprotected thumb drive should do the trick.
Provided they allow you to use it.  Our IT department has USBs disabled (except for mice and keyboards).   :|

They came first for the USB ports and I said nothing, because my mic didn't work. :(

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Using a temporary computer & ACAD system?
« Reply #13 on: March 17, 2010, 11:45:58 AM »
OK, I think I conquered the issue of locating the needed bmp files.
Code: [Select]
;;  by CAB
;;  reads a MNS file and creates a text file listing all bmp file names found
(defun c:MyIcons (/ file path ICON_lst fn ln data ptr LineStr MNSfile OutFile)
  (setq MNSfile "CAB1.mns"
OutFile "Icons.txt")
  
  ;;  return a list of text string for each line in the file
  (defun ReadFile (fname / fn ln AllLines)
    (if (setq fn (findfile fname)) ; only if the file is found
      (progn ; fn contains the full path
(setq fn (open fn "r")) ; open file for reading
(while (setq ln (read-line fn)) ; read all the lines in the file
 (setq AllLines (cons ln AllLines))
)
(close fn) ; close the open file handle
      )
    )
    AllLines
  )

  ;;  parser by CAB single character delim, match ","
  (defun sparser (str delim / ptr lst)
    (while (setq ptr (vl-string-search delim str))
      (setq lst (cons (substr str 1 ptr) lst))
      (setq str (substr str (+ ptr 2)))
    )
    (reverse (cons str lst))
  )

  ;;  Read the MNS file looking for the first bmp in each line
  ;;  add the bmp to the list
  ;;  find the second bmp in the line & add it too
  ;;  Write results to Icon.txt file
  (if (setq data (ReadFile MNSfile))
    (progn
      (setq path (vl-filename-directory (findfile MNSfile)))
      (while (setq LineStr (car data))
(setq data (cdr data))
(foreach part (sparser LineStr ",")
 (if (vl-string-search ".bmp" part)
   (progn
     (setq part (vl-string-trim "\" \t\n" part)
   part (substr part 1 (+ 4 (vl-string-search ".bmp" part)))
     )
     (setq ICON_lst (cons part ICON_lst))
   )
 )
)
      ) ; while
      (if (setq fn (open (strcat path "\\" OutFile) "w")) ; open file for writing
(progn
 (write-line (strcat "BMP files used in " MNSfile) fn)
 (write-line (strcat "Date: " (rtos (getvar 'cdate) 2 4)) fn)
 (foreach ln ICON_lst ; write all the sorted data
   (write-line (strcat ln "  ==  " (findfile ln)) fn)
 )
)
      )
      (and fn (close fn)) ; close the open file handle
      (princ (strcat "\nData File --> " (strcat path "\\" OutFile)))
    )
  )
  (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.

Slim©

  • Needs a day job
  • Posts: 6566
  • The Dude Abides...
Re: Using a temporary computer & ACAD system?
« Reply #14 on: March 17, 2010, 11:52:38 AM »
Kerry,
How do you run the MNL file?


I wish this was extra. The housing market is so bad I have no work. I have not been an employee since 1977. :-(

The MNL file loads automatically with an MNU or MNS file of the same name.
I drink beer and I know things....