Jump to content

Utilizing ACADDOC.LSP combined with ACAD.LSP?


tzframpton

Recommended Posts

Hello all, I have an admin question.

 

We are about to roll out a whole new set of CAD administrative files. What I'm inquiring about is how best to divide my own personal LISP routines with those we set in our ACADDOC.LSP file. I'm thinking that anything I always want personally available to me, I can put in the ACAD.LSP file, as this is a file on my local machine. This way we can load only the general LISP files with the (load "[LISP]") function which are items specific to our company.

 

Would this be the best route to go? Here's why I'm asking... I'm at a loss when I switch profiles to do any "admin" editing (such as LISP files, Tool Palettes, Templates, etc). I want to be able to shut off my personal LISP routines for the time I'm doing admin stuff so I don't forget what's truly available and assume it'll "work" for the end user. I was thinking about maintaining a second ACADDOC.LSP file and path, loading only my specific LISP routines, then when I switch profiles I can remove that "extra path".

 

Any ideas to help? Thanks in advance! :)

Link to comment
Share on other sites

If you switch profiles should be ok as you could set two different support paths a corporate set of searches and a user set of search paths, if you are using a lisp etc to flip profiles then maybe unload all user autoloaded lisps so commands no longer available.

 

We have a AUTOLOAD.lsp which is called from either acaddoc.lsp or appload etc so maybe you could add this load line (load "c:\somewhre\stykface") at end but not have on other pc's

Link to comment
Share on other sites

I include this in our AcadDoc.lsp file(s) for each version:

 

((lambda (user / file)
  (if (setq file (findfile (strcat user ".lsp")))
    (load file)
  )
)
 (getvar 'loginname)
)

 

... This 'username'.lsp file is contained on the user's personal network space, and is mapped into our SFSP for each profile, for each version.

Link to comment
Share on other sites

Thanks all, I'll try out these methods and see what works best. RenderMan, hope I can figure yours out!! haha, I'm assuming to path to the file? Such as a "P:\\CAD\\tzframpton.lsp" type of format?

 

*EDIT*

Oh and can you fill me in for what SFSP stands for?

Link to comment
Share on other sites

RenderMan, hope I can figure yours out!! haha, I'm assuming to path to the file? Such as a "P:\\CAD\\tzframpton.lsp" type of format?

 

The user parameter is the string value of the user's LoginName system variable ("tzframpton"), so your pseudo-LISP file name would be "P:\\CAD\\tzframpton.lsp", where "P:\\CAD\\" is included in the SFSP.

 

We integrate some user personal network space into each of our Profiles, so that the user can control their workspace, etc. Our Enterprise stuff (limited as it may now be in this new group) is there to provide functionality... The user is not relegated to using only those tools.

 

The LISP snippet I offered above simply looks to see if the user has a LISP file of their name, and if so, loads it. If not, nothing happens. The advantage to having the user place their personal routines either in that LISP file, or use it as a place for 'Autoload' statement(s), is that the same, small snippet of code I posted above can be used to load ALL user's files, and by naming it their user name, it gives them a sense of ownership, etc. as well.

Link to comment
Share on other sites

Just to throw it out there... I also set our SFSP via Acad.lsp file.

 

This makes it really simple to setup SFSP for each (client-specific?) Profile, and version... The biggest advantages, are that to implement, you simply bootstrap your initial ARG (we make a separate application icon for each version, each profile), so that the ARG includes a single path to your Acad.lsp file and when loaded your SFSP is built programmatically. After that, when you need to make a change to a Profile's SFSP, one simply updates the code in Acad.lps, and everyone simply reloads it... Near instantaneously, all users have the updated SFSP (and any other Profile changes you want to make). Lemon squeezy.

 

No more unload your profile, and restart crap. :thumbsup:

Link to comment
Share on other sites

RenderMan = TheMan!!

 

Just wanted to let you know that your little code snippet worked wonderfully. We all have a P:\ drive that is our "Personal Drive" so I see the ingenuity behind it. I searched a few code items in the Developers Section and I understand what's going on in your code. Very simple yet effective!

 

:thumbsup:

Link to comment
Share on other sites

RenderMan = TheMan!!

 

Just wanted to let you know that your little code snippet worked wonderfully. We all have a P:\ drive that is our "Personal Drive" so I see the ingenuity behind it. I searched a few code items in the Developers Section and I understand what's going on in your code. Very simple yet effective!

 

:thumbsup:

 

That is kind of you to say; I'm always happy to help... This is just one of the tricks in my BlackBox. :beer:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...