Results 1 to 6 of 6

Thread: OVERWRITE licpath.lic using lisp.

  1. #1
    I could stop if I wanted to
    Join Date
    2011-09
    Posts
    308
    Login to Give a bone
    0

    Default OVERWRITE licpath.lic using lisp.

    Hi gang,

    I want to add a line of code to acad.lsp to overwrite the existing LICPAT.lic file with a different one.

    I have been using this:

    Code:
    (vl-file-copy "Z:/AutoCAD 2018/LICPATH.lic" "C:/ProgramData/Autodesk/CLM/LGS/001J1_2018.0.0.F/LICPATH.lic" T)
    Which actually appends the file, it does not overwrite it. so over time the LICPATH file reads:
    SERVER oldserver 000000000000
    USE_SERVER
    SERVER newserver 000000000000
    USE_SERVER
    SERVER newserver 000000000000
    USE_SERVER

    Thought about using the SHELL command and got this far, but the spaces etc. in the paths are messing me up.

    Code:
    (command "SHELL" "copy Z:\\AutoCAD 2018\\LICPATH.lic C:\\ProgramData\\Autodesk\\CLM\\LGS\\001J1_2018.0.0.F\\LICPATH.lic /y")
    Any help is, as always, much appreciated.

    -JP

  2. #2
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: OVERWRITE licpath.lic using lisp.

    Hi,

    A work around that process is via using the function vl-file-delete then use the vl-file-copy with the same file name but with different directory.

  3. #3
    I could stop if I wanted to
    Join Date
    2011-09
    Posts
    308
    Login to Give a bone
    0

    Default Re: OVERWRITE licpath.lic using lisp.

    Yeah, I tried that and what happens is I get the "Specify license server" dialog box. It's like it can't replace it before AutoCAD tries to read it.

    I guess it's I'll try again and put it later in the script maybe?

    I'll keep you posted.

    Thanks!

  4. #4
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: OVERWRITE licpath.lic using lisp.

    Can you please post a snapshot of that dialog box message?

  5. #5
    I could stop if I wanted to
    Join Date
    2011-09
    Posts
    308
    Login to Give a bone
    0

    Default Re: OVERWRITE licpath.lic using lisp.

    Actually I think we maxed out our licenses. Seems to be working!!!

  6. #6
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: OVERWRITE licpath.lic using lisp.

    On a completely different angle, is there a reason you prefer to use licpath.lic as opposed to using the environment variable ADSKFLEX_LICENSE_FILE, which can be changed with GPO?
    R.K. McSwain | CAD Panacea |

Similar Threads

  1. LISP routine to overwrite layer descriptions...
    By dortega4269 in forum AutoLISP
    Replies: 39
    Last Post: 2014-07-23, 08:04 PM
  2. LicPath problem With Navis 2009.1 Flex Licence
    By lorenzo.redivo in forum NavisWorks - General
    Replies: 1
    Last Post: 2008-09-04, 12:19 AM
  3. Insert & overwrite MVBlock Def?
    By rcroke in forum AutoLISP
    Replies: 5
    Last Post: 2008-01-04, 11:45 AM
  4. Accidental Overwrite
    By mockdeep in forum AutoCAD General
    Replies: 21
    Last Post: 2007-09-24, 12:52 PM
  5. lines merge/ overwrite
    By jims.111743 in forum Revit Structure - Wish List
    Replies: 0
    Last Post: 2007-08-14, 08:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •