archT layrestore in AutoCAD 2005?

Discussion in 'AutoCAD' started by Gordon Price, Mar 5, 2005.

  1. Gordon Price

    Gordon Price Guest

    I am trying to move some archT 14.5 customization over to
    Acad2005/archT2004, and running into trouble. Specifically this code:
    (defun aCLayerStyle (layerStyleName)
    (setq archTdir (kti_archt_getvar "dir"))
    (setq laystyle (strcat archTdir "\\styles\\layer\\" layerStyleName))
    (kti_archt_layrestore laystyle (+ 1 2 4 8 16) 1 0)
    (princ)
    ); defun

    When driven by this menu macro:
    [Load all Layers]^C^C^P(aCLayerStyle "jca-all.lay")

    Results in this error at the command line:
    Could not open file "C:\PROGRAM
    FILES\AUTODSYS\ARCHT2004\STYLES\LAYER\JCA-ALL.LAY" (read).

    However, using the Restore Layer Style dialog box works, ending with
    143 layer(s) updated from "C:\PROGRAM
    FILES\AUTODSYS\ARCHT2004\STYLES\LAYER\JCA_ALL.LAY".
    Which seems to prove that the LAY file and path is valid, and it seems to be
    only when done in LISP that the error happens.

    Anyone here doing anything with archT and able to comment? The user is
    upgrading from Acad14/archT14.5 to Acad2005/archT2004 for the time being,
    with me hoping they can move to Revit in the long term. however, I have to
    make archT work for now, and some of my old customization is popular, so I
    would like to get it working, preferably without resorting to a rewrite that
    uses Acad LayerStates.

    Thanks in advance,
    Gordon
     
    Gordon Price, Mar 5, 2005
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.