Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Startup File Issue (SFSP)

11 REPLIES 11
Reply
Message 1 of 12
garrettstuart
397 Views, 11 Replies

Startup File Issue (SFSP)

Before I even mention my problem, I want to say that I know how to add lisp routines and other randoms to CAD at startup, that's not where the problem lies. Please read what I've tried before making suggestions.

 

We have a server; everyone at the office has access to the drives on that server. On that server, and in one of those drives, are folders - these folders contain different AutoCAD items such as lisp routines and linetypes. What we want is to have everyone's computer load those folders at startup so that if one of us drafters finds a useful lisp routine or has a new linetype everyone needs he or she places it in that folder and all is well.

 

We have added these folders to the top of the Support File Search Path, and the Trusted Locations, and they are listed in the Working SFSP. These items, however, are not available for use in AutoCAD. They work fine if you APPLOAD them, but that defeats the purpose. Now months ago, when I first tried this, it worked like a charm, but since about spring it just refuses to load the stuff in those folders.

 

 

This is probably just an AutoCAD issue, rather than a C3D (2015) problem, but I figured it wouldn't hurt to have that info.

Any ideas?

Tags (2)
11 REPLIES 11
Message 2 of 12
tcorey
in reply to: garrettstuart

Just placing a file in the folder is not going to make AutoCAD load it, whether it's in a support file search path or not. You have to do something to tell AutoCAD you want that code loaded into memory.

 

You could write a lisp routine that reads the names of all .lsp files in the folder and then loads them. Place that code in your acad.lsp (loads with each session) or acaddoc.lsp (loads with each drawing.)

 

Best regards,

 

Tim

 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 3 of 12
tcorey
in reply to: garrettstuart

Modify this code to fit your pathing:

 

(vl-load-com)

  (setq lisps (vl-directory-files "c:/data/lisp/test" "*.lsp" 1))
  (foreach Lispfile lisps (load (strcat "c:/data/lisp/test/" lispfile)))

 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 4 of 12
dgorsman
in reply to: tcorey

I'd recommend against giving *everyone* access.  LISP pulled off the 'net are frequently samples and examples without niceties like lcoalized variables, error handling, or standardization for your specific environment.  To say nothing about competing routines - one changes layer settings this way, one changes the settings another way, another adds (defun ...)'s which overwrite those defined in other files like setting *error* function handlers.  If the file fails to load or forces an abrupt exit during loading it can stop everything else from loading.

 

That kind of chaos works against the attempt at providing order in the form of automation.  Vette for performance and standardization, test, then implement.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 5 of 12
tcorey
in reply to: dgorsman

I agree. I would never do what the OP is suggesting, just load everything that any user happens to place in a folder. What if someone were to write a lisp file that is meant as a virus, posts it as something that does some useful function, a user downloads and then next person who opens AutoCAD causes a panic because all your drawing files have been deleted? Not safe. That would, indeed, cause some friction burns, on your rear end when your boss throws you out on the sidewalk.

 

But, he/she asked for it, so I provided the code. It's his/her choice how to implement.

 

Tim



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 6 of 12
garrettstuart
in reply to: tcorey

Correct, he did ask for it. As he works with only 3 other capable drafters who are on the same page, work in the same room, and test each lisp on their own first. There are 3 lisps in the folder as of now, and more importantly 5 linetypes that we'd like to have autoload without the effort of making sure everyone always has everything.

 

The reason I'm even asking is because the process I described worked for about a month and then just stopped. I was never sure why but I didn't have the time to figure it out. Thanks for the snippet of code tcorey, I'll try it out in a little bit.

Message 7 of 12
AllenJessup
in reply to: garrettstuart

The only system I've actually seen in operation (rather than theory) is to have all the installations point to their local drive in the default location of a fresh install. Then set up a batch file that copies all the custom files from the server to the local drives each time the computer starts.

 

What I do is to keep the acaddoc.lsp file on the server and at the top of the search paths. Each time I want to add a lips, other program or set a variable I edit the file. I don't load linetypes but it should be possible. Keeping the acaddoc.lsp on the server means I only have to edit the one file rather than one on each computer.

 

Allen

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 8 of 12
AllenJessup
in reply to: garrettstuart

Oh. BTW. Linetypes - Add them to a template. That covers any new drawings.

 

Allen

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 9 of 12
dgorsman
in reply to: AllenJessup

Whenever I get the urge to add lips to the software... it's time to go home.  😄

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 10 of 12
garrettstuart
in reply to: AllenJessup

Ahh that's a clever idea. If I can't get what I'm trying to do to work I'll probably use that method.

Thanks

Message 11 of 12
rl_jackson
in reply to: garrettstuart

What Allen suggest is probably the best method. And should probably included any plotter setups and ctb/stb as well.

 

I think what you will find is that your going to create latency's between the software loading and going out to the sever to collect additional info. Store it in a common location on each PC, and only go to the server for your files, which in some cases may need to be on the local system as well for the same reason, when projects start to get large in size.


Rick Jackson
Survey CAD Technician VI

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 12 of 12
garrettstuart
in reply to: rl_jackson

Thanks for the thought. We actually do our ctb (and files) on the server already. Unfortunately, that means AutoCAD's loadtime/reliability is already garbage, so we're not really trying to mitigate those, just add more functionality. When you have more than 2 people on a project it becomes more about the number of steps you have to take for each person than the time they take, at least for us.

 

If it was in my power to do a workflow overhaul I would, but for now, 1 process at a time.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report