Enforcing Standards with Acad.lsp and Init.lsp in C3D

Enforcing Standards with Acad.lsp and Init.lsp in C3D

Anonymous
Not applicable
565 Views
0 Replies
Message 1 of 1

Enforcing Standards with Acad.lsp and Init.lsp in C3D

Anonymous
Not applicable

I'm not an IT person and I've scoured everything that I can find on AutoLISP to help me with a problem. I'm using an acad.lsp routine from Paul Munford to reference an init.lsp routine on our server (Dropbox Enterprise): 

 

;set the path
(setq lisp_path "<server path for init.lsp>")

;If you can find a file called ‘init.lsp’
(if (findfile (strcat lisp_path "init.lsp"))

;Load the file called ‘init.lsp’
(load (strcat lisp_path "init.lsp")))


The init.lsp calls a .arg profile on the network and sets it as current:

;Load Visual Lisp
(vl-load-com)

;Import the "User" Profile from the network
(vl-catch-all-apply 'vla-importprofile (list

(vla-get-profiles (vla-get-preferences (vlax-get-acad-object)))

"User"
"<server path>User.arg"
1)
)

;Set "User" Profile current
(vla-put-ActiveProfile (vla-get-Profiles (vla-get-Preferences (vlax-get-acadobject)))"User")

;Set the "modemacro" sysvar to report the latest profile

(SETVAR "modemacro"(STRCAT "PROFILE: $(getvar, cprofile)"))

 

I have attempted several test runs with C3D 2019.1 and this isn't doing what I would like to do. First, when the Acad.lsp file is in the Support folders it loads C3D as AutoCAD and I can't change the workspace to C3D. Then, the User profile that I have created isn't present as the support paths are not what I want. I like this routine because in the future I can control init.lsp and make changes from a centralized location. 

I guess I have several questions:
1) Is Dropbox up to the task? Has anyone pulled off Autolisp or Visual Lisp routines using Dropbox? 
2) How can I make this work? Should I be using something other than Acad.lsp? 
3) Should I go the profile route or should I write a routine to call my tool  palettes (the desired goal)? Is this going to be more stable and enforceable over the long run? What are some great example codes to do this? I'm new to lisp and have the winter before we get into the busy season and my chance to enforce standards will be over. 

I'm almost at the point of allowing my 8 users to import the profile from the network and holding it with a p/ switch. However, I'm wondering if this will be stable over time, and I would like more control. 

Thanks in advance for any advice. 

0 Likes
566 Views
0 Replies
Replies (0)