Author Topic: Standalone Customizations  (Read 6960 times)

0 Members and 1 Guest are viewing this topic.

dubb

  • Swamp Rat
  • Posts: 1105
Standalone Customizations
« on: October 05, 2017, 12:53:39 PM »
I'm looking for a solution or discussion on the topic of how to facilitate autolisp, tool palette, and cui customizations in a stand alone environment and a networked environment while keeping everything up to date.
The situation I have is, we have designers on desktop and notebooks who utilize all of the customization. The customization's files are saved on the network however, when the cad designers with the notebooks leave the office network. All of the customization's are gone or do not work.
Another recent situation we had was when one of our server hard drives crashed so we had to shut the network down to repair the raid. AutoCAD tools were down and bogged down the performance. I assume partly because some Autolisp files contain vl-reactors or referred to non-existent files on a downed network.

I put some thought into this but haven't taken any action.
As a solution I could create a script to monitor file changes to trigger an synchronization of customization files between server and the local directory on a workstation or notebook. What to do with tool palettes is somewhat a guess to me. I'm not sure how they will migrate between server and being localized. So I would propose having all of the cusotomizations installed locally and utilize the server as a mirror for the most up to date customizations.
Some functions come to mind:
File-Handling Functions Reference (AutoLISP)
https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-AutoLISP/files/GUID-F70DECFC-DBE1-4F04-A64C-B3F869A636A2-htm.html

Run the dos commands in autolisp: robocopy (to synchronize files)
https://www.computerhope.com/robocopy.htm

Anythoughts?

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Standalone Customizations
« Reply #1 on: October 05, 2017, 02:30:52 PM »
Offline Files (the name may have changed since Win 7).  I've used that successfully with our laptops, covering everything from LISP to CUIx to third-party data files.  Don't use it with our desktops though, as when something server related "goes down" there's bigger problems afoot - no drawings, for starters.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

dubb

  • Swamp Rat
  • Posts: 1105
Re: Standalone Customizations
« Reply #2 on: October 05, 2017, 06:15:27 PM »
Offline Files (the name may have changed since Win 7).  I've used that successfully with our laptops, covering everything from LISP to CUIx to third-party data files.  Don't use it with our desktops though, as when something server related "goes down" there's bigger problems afoot - no drawings, for starters.

During a projected server downtime, we copy project files locally so we can continue productivity. However, it seems like AutoCAD takes alot of time to respond and freezes when the network is down. I assume this is due to the support directories referring to the server.

CincyJeff

  • Newt
  • Posts: 89
Re: Standalone Customizations
« Reply #3 on: October 06, 2017, 12:23:55 PM »
We run all of our customizations from a local folder that is replicated from a network location through ROBOCOPY that is called from a lisp loaded/run from acad.lsp. It's set to run once a day when a drawing is opened. For immediate updates there's a function to perform the same ROBOCOPY on the fly. Since everything is always local it always runs. There's also a network profile that substitutes the network drive letter if necessary. We've got palettes, an enterprise cui, modified acad.lin file, PC3 files, CTB files.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Standalone Customizations
« Reply #4 on: October 06, 2017, 01:46:50 PM »
We have moved to having everything running off of remote desktops running on AWS, including AutoCAD. This means that our users can use ANY internet connected device that can run an RDP client or HTML5. Obviously some form factors will work out better than others due to type of input, etc., but it works really well and ensures that they are always working on the current files that are on our network, using latest customization, etc.

The main reason we did this was because we have three offices and it is the most efficient way to make sure everyone is using the same files.

There are some challenges to setting it up properly, but it can be done.

ChrisCarlson

  • Guest
Re: Standalone Customizations
« Reply #5 on: October 06, 2017, 01:55:30 PM »
I think this was discussed before, we have setup a shared versions of the CUI, toolbars, blocks, settings, etc. on our NAS. We noticed an issue with offline files and are currently investigating running a simple .BAT file to hash check and copy over new versions of the files.

PKENEWELL

  • Bull Frog
  • Posts: 309
Re: Standalone Customizations
« Reply #6 on: October 11, 2017, 11:37:42 AM »
In my past life I was a CAD Manager and we had this same problem. Without getting network support from IT for using a BAT or other file util in the network startup script, I ended up using a freeware file syncing tool and installed on all CAD workstations / Laptops. Then I put the tool in the startup folder so it would open and run at the OS startup. Then it would monitor the network folder and sync any customization files that had a newer date. Doing this - I did not need to go around to 60 workstations and make sure everyone had a local update. For remote workers - access via WAN or cloud files would be necessary to do the same thing (Think Google Docs for example - keeps everything synced on it's own if installed).
"When you are asked if you can do a job, tell 'em, 'Certainly I can!' Then get busy and find out how to do it." - Theodore Roosevelt

dubb

  • Swamp Rat
  • Posts: 1105
Re: Standalone Customizations
« Reply #7 on: October 13, 2017, 11:54:39 AM »
Here is the status of my solution.

Some the of the lisp customizations were modified to reference a relative directory path instead of full path.
Tool palette block buttons refer to their new directory on local machine. I really wish we could use relative paths instead of absolute.

Included within the start up scripts is a function that can be called from the end user to synchronize customization files between the server and local machines. The only issue is when to initiate a synchronization. I am trying to decide if it should be scheduled or upon boot up of windows or start up of autocad.

Synchronizing at start up of windows: If done this way the latest updates will only be applied from the time windows was started up. The problem with this approach is the end users only get one update. Blocks, templates, and other tools get updated sometimes mid day so the end user will have to manually run the sync.
Synchronizing at start up of AutoCAD: For some reason, every time i open a new dwg file, the script runs and the dos window appears. The problem with this approach is the annoying dos window and the frequency of the sync script running. If i could make it run at start of the autocad program instead of every dwg, it would make sense.

Here is my script. The (mircad) function mirrors the server, the (upcad) function uploads from local machine to server.
Code: [Select]
;If the directory does not exist
(if
  (not (vl-file-directory-p "C:/CAD Tools"))
  (progn
    (princ "\nDirectory does not exist")
    (princ "Creating directory")
    (initget "Yes No")
    (vl-mkdir "C:\\CAD Tools")
    (setq syncnow (getkword "\nWould you like to syncrhonize CAD Tools now? [Yes/No] :"))
    (cond
      ((= syncnow "Yes")
       (alert (strcat "\nTools was missing." "\nWe will now syncronize the Tools directory from server" "\nThis might take a while....."))
       (mircad)
       )
      ((= syncnow "No")
       (princ)
       )
      )
    )
  (progn
    (princ "\n..........CAD Tools Directory already exist")
    )
  )
;Mirror function
;Syncronizing directories
(defun mircad()
  (princ "\nSyncing Tools")
(command "shell" (strcat "robocopy \"serverpath\" \"C:\\localpath\" /MIR /R:10 /W:5 /ETA /TEE /v /LOG+:CADToolsUpdateLog.txt"))
  (princ)
  )
(defun upcad()
  (princ "\nUpdating Tools")
(command "shell" (strcat "robocopy \"C:\\localpath\" \"server-path\" /MIR /R:10 /W:5 /ETA /TEE /LOG+:CADToolsUpdateLog.txt"))
  (princ)
  )

In my past life I was a CAD Manager and we had this same problem. Without getting network support from IT for using a BAT or other file util in the network startup script, I ended up using a freeware file syncing tool and installed on all CAD workstations / Laptops. Then I put the tool in the startup folder so it would open and run at the OS startup. Then it would monitor the network folder and sync any customization files that had a newer date. Doing this - I did not need to go around to 60 workstations and make sure everyone had a local update. For remote workers - access via WAN or cloud files would be necessary to do the same thing (Think Google Docs for example - keeps everything synced on it's own if installed).
« Last Edit: October 13, 2017, 06:09:07 PM by dubb »

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Standalone Customizations
« Reply #8 on: October 13, 2017, 12:42:42 PM »
I still use XCOPY for my tools and only update on reboot.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

JohnK

  • Administrator
  • Seagull
  • Posts: 10603
Re: Standalone Customizations
« Reply #9 on: October 13, 2017, 06:19:36 PM »
I use Unison for these types of syncing situations.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Standalone Customizations
« Reply #10 on: October 14, 2017, 03:17:21 PM »
I use Unison for these types of syncing situations.
This looks interesting :)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

JohnK

  • Administrator
  • Seagull
  • Posts: 10603
Re: Standalone Customizations
« Reply #11 on: October 17, 2017, 08:06:16 AM »
Unison is very cool. It has its limitations and frustrations but overall when you get it working it gives you a very nice warm feeling of security.

Because of how you use and set up Unison you can/have to update two aspects; the PRF (preference files) and the script file itself.

A quick tip for you though.

I created a file called "ignore-common" in my .unison directory and I use it in all my .prf files like this:

Code: [Select]
# Unison preferences file

#---[ Root ]------------------------------------------------------------
root = C:/
root = D:/

#---[ Paths ]-----------------------------------------------------------
# Paths to synchronize
path = ACME

#---[ Options ]---------------------------------------------------------
batch = true
# confirmbigdel = false
# Read up on this feature before using.

#---[ Ignore ]----------------------------------------------------------
include ignore-common
# include common ignore patterns

ignore = Name off*

This is the ignore-common file.
Code: [Select]
# Ignore list
#---[ File Names ]------------------------------------------------------
# OS generated files #
ignore = Name .DS_Store
ignore = Name .Spotlight-V100
ignore = Name .Trashes
ignore = Name ~*
ignore = Name thumbs.db
ignore = Name Thumbs.db
ignore = Name .thumbnails
ignore = Name desktop.ini
ignore = Name ._*
# Custom
#
#---[ Paths ]-----------------------------------------------------------
ignore = Path *archive
ignore = Path *.sync
ignore = Path *sync*
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Standalone Customizations
« Reply #12 on: October 17, 2017, 10:06:45 AM »
Thanks for taking the time to explain John.  :)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

JohnK

  • Administrator
  • Seagull
  • Posts: 10603
Re: Standalone Customizations
« Reply #13 on: October 17, 2017, 07:14:10 PM »
No problem.

Calling Unison from within lisp should be fairly straightforward; you could even maintain the .prf files all from within lisp and/or only call the commands necessary instead of all, every time. Might turn out very slick.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

dubb

  • Swamp Rat
  • Posts: 1105
Re: Standalone Customizations
« Reply #14 on: October 17, 2017, 07:22:59 PM »
No problem.

Calling Unison from within lisp should be fairly straightforward; you could even maintain the .prf files all from within lisp and/or only call the commands necessary instead of all, every time. Might turn out very slick.

Thanks! Seems pretty cool. Also running it with lisp is a plus. I will have to check this out.