Saving MODELS

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Trying to save Cordell models in the bipolar directory in cmp/standard/ with Notepad.
When I save the file, it comes back with 'Access Denied'. I have checked the Run as Administrator in property box accessed from right click on LTSpice avatar.
Any ideas why it won't permit adding a new model?
 
Trying to save Cordell models in the bipolar directory in cmp/standard/ with Notepad.
When I save the file, it comes back with 'Access Denied'. I have checked the Run as Administrator in property box accessed from right click on LTSpice avatar.
Any ideas why it won't permit adding a new model?

Run as Administrator of the word editor (ex. Notepad). I can add new models on Windows 7 OS, with this method.

Regards,
 
Just another Moderator
Joined 2003
Paid Member
Hi Hugh, I avoid saving anything in the LTspice directories these days, win7 and up locks down the dirs, and has a nasty habit of making copies in places you can edit them (so there are actually two copies of the same files). This means that if you run as administrator, sometimes you get different results to when you run as a normal user.

I just create a file called extras.sub which I add models to and copy it into the project directory and put an include statement in the main asc. It would probably be smart to have a central one and just create a shortcut from the current project dir to that.

The nice thing is if you want to share your model you just zip up the whole dir and someone else can run it without needing to play around finding the models and putting them in the relevant ltspice dirs.

Tony.
 
Mooly,

I carefully read your instructions, and could not fully understand any of it......
I am something of a muffet since my stroke, particularly with software, but I will spend a few hours on this yet.

Bimo,
I tried running as an administrator in Notepad and LTSpice and no dice. Very odd.

Tony,
I set up a separate sub-directory called extra and it sticks. BUT, I cannot pick out my models from them as I'm reluctant to put all the project directories - BTW I have one directory for all my projects - and this would be prohibitive, would it not? I guess you mean putting in an edit script to see the component model and then pull it in?

Conclusion: This is very difficult to use with Windows 7 OS, which fights you at every move, treating you as an interloper, preventing change. The default is NOT administrator, which is very irritating. Since my PC was recently attacked by a crypto-virus I have found using my LTSpice very difficult, despite reinstalling and rebuilding all lost files from backup. Only by having two large HDD and three logical HDDs could I recover most of it. It a bind since I use LTSpice constantly; it's a wonderful tool.

Thanks for the help, I will get there, if you have any ideas, I'm all ears.......

Hugh
 
Last edited:
Just another Moderator
Joined 2003
Paid Member
Hi Hugh, you know, it's been so long since I created a model from scratch I can't work out how I got the components that I added to my extras.sub into the schematic! I thought it was just a matter of using the dropdown at the top of the component window to pick the current directory, but that only shows me things that have their own asy file. I have a schematic with BYV32E's on it, and the model definition in extras.sub, but I can't work out how (other than copying an existing one) to get a new one from scratch.

It must be possible but right at the moment I can't remember how I did it :confused:

edit: I did find one other way to work around the problem as well, and this may be the easiest. When you install LTspice don't use the default directory. Instead install it to something like c:\LTSpice then everything will be owned by you and nothing will be under windows security nightmare :)

Tony.
 
Last edited:
Administrator
Joined 2007
Paid Member
Conclusion: This is very difficult to use with Windows 7 OS, which fights you at every move, treating you as an interloper, preventing change. The default is NOT administrator, which is very irritating. Since my PC was recently attacked by a crypto-virus I have found using my LTSpice very difficult, despite reinstalling and rebuilding all lost files from backup.

Hugh,

If it was all OK until you got hosed by a virus, then it sounds a little as though you may have some problems carried over.

You can set LT to run as admin by default. Click my signature line... its the first picture in the thread :)
 
I always create and save my .txt or .sub model files on my desktop and then cut and paste them into the appropriate LTSPICE directory for the same reason you described. Also, I have scad3.exe set to run as administrator so it can modify files in its directory without complaint.
 
Just another Moderator
Joined 2003
Paid Member
It seems there is a fatal flaw in my creation of a file to contain non-standard (ie not supplied with LTSpice) parts. It is great for portability and addresses that issue very well. What it doesn't allow you to do is something like place a standard diode and then change to one of the ones in the extras.lib

I just did some experimenting, and I suspect that I had at some point put the models into the lib/cmp/standard.dio file (and bjt file) which allowed me to change to them within LTSpice. Once they are on the schematic as long as the extras.lib is included then they work regardless of whether they are in the base LTSpice install or not. but the only way to get one is to copy and paste another one (which is what I generally do because it is quicker).

I think that the option of installing to somewhere other than c:\Program Files\ is the safest way of dealing with the issue (I found that is what I had done on my VM I use for personal stuff on my work laptop). That allows you to run ltspice in unprivileged mode, and you can also edit library files with notepad and save without any issues.

I'm going to try putting an include line into the standard.dio file and see if it can be made to pick up another file with models in it, as it would be nice to be sure that LTSpice won't trash anything that has been manually added.

Tony.
 
With help from Paul Bysouth I fixed it; set admin, put both models and LTSpice on the desktop, and using Explorer, renamed the cmp, sub and sym as *OLD, then dropped the sorted models, reorganised by Paul, into the original cmp, sub and sym folders.
Worked like a treat, and my sincere thanks to Paul and all those here who helped.
Hugh
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.