Author Topic: Where does LTspice keep its settings?  (Read 13188 times)

0 Members and 1 Guest are viewing this topic.

Offline owiecc

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: dk
    • Google scholar profile
Where does LTspice keep its settings?
« on: February 16, 2015, 08:49:56 am »
I have created a custom color scheme for LTspice based on new MATLAB colors. I would like to have these setting on all my computers. Is there a file I can sync?

I am using OS X version of LTspice but if someone knows how this is saved in Windows version please also comment. OS X may use similar file structure.
 

Tac Eht Xilef

  • Guest
Re: Where does LTspice keep its settings?
« Reply #1 on: February 17, 2015, 02:09:31 pm »
On Windows it's in %APPDATA%\LTspiceIV.ini (e.g. C:\Users\[username]\AppData\LTspiceIV.ini or similar, depending on the Windows version & setup).

On OSX ... hmmm, that's a bloody good question! I thought I found it under ~/.wine/drive_c/users/[user_name]/Application Data/LTspiceIV.ini, but that's for the old WINE-packaged versions. For the newer native versions from the past year or so, I couldn't find LTspiceIV.ini or anything obviously LTspice-related in the usual places (e.g. the app bundle, system & user application support folders, etc, etc).

Maybe ask ltspice@linear.com? And post the answer here :-+
 

Offline owiecc

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: dk
    • Google scholar profile
Re: Where does LTspice keep its settings?
« Reply #2 on: February 17, 2015, 07:04:42 pm »
Tried the email. It does not exist :( I tweeted them, maybe someone will respond.
 

Offline atferrari

  • Frequent Contributor
  • **
  • Posts: 314
  • Country: ar
Re: Where does LTspice keep its settings?
« Reply #3 on: February 17, 2015, 11:16:22 pm »
Ask in the LTSpice group at Yahoo.
Agustín Tomás
In theory, there is no difference between theory and practice. In practice, however, there is.
 

Offline owiecc

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: dk
    • Google scholar profile
Re: Where does LTspice keep its settings?
« Reply #4 on: April 01, 2015, 07:23:29 pm »
Thanks datumplane. I tried changing the keys using defaults and plutil but LTspice seems to ignore the changes.
 

Offline suenteus

  • Newbie
  • Posts: 3
  • Country: nl
Re: Where does LTspice keep its settings?
« Reply #5 on: October 20, 2016, 11:43:17 am »
Hey all. Is this thread totally dead? Did anyone ever figure out where LTSpice on Mac keeps its settings?

I've got a project whose directory I moved. There's a model file inside the directory but now LTSpice is looking in the old directory for that file. I've opened the .asc file and can't find any mention of the model directory in there, so it must be (I imagine) in the LTSpice settings somewhere.

Any help would be super appreciated!
 

Offline matseng

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: se
    • My Github
Re: Where does LTspice keep its settings?
« Reply #6 on: October 20, 2016, 03:16:11 pm »
On OSX LTspice keeps its general settings in a binary formatted plist file.

You can use the "plutil" utility to either convert the file or just view it as a "human-readable fashion" as the help file puts it. ;-)

Code: [Select]
plutil -p /Users/matseng/Library/Preferences/LTC.LTspice.plist
 

Offline cjheath

  • Contributor
  • Posts: 11
  • Country: au
Re: Where does LTspice keep its settings?
« Reply #7 on: April 03, 2019, 01:24:21 am »
I was looking for a way to change the hotkeys on OSX.

LTSpice IV on OSX keeps these in the dialog definition files (which are also PLIST files), e.g. /Applications/LTspice.app/Contents/Resources/ASCdocument.nib. Note that each dialog has its own menus with separate definitions of the same hotkeys.

If you dump these using plutil -p, you can see sections like this:

Quote
    61 => {
      "$class" => <CFKeyedArchiverUID 0x7fd21ec07c30 [0x7fff92f098f0]>{value = 20}
      "NSKeyEquiv" => <CFKeyedArchiverUID 0x7fd21ec09e20 [0x7fff92f098f0]>{value = 63}
      "NSMenu" => <CFKeyedArchiverUID 0x7fd21ec098e0 [0x7fff92f098f0]>{value = 56}
      "NSMixedImage" => <CFKeyedArchiverUID 0x7fd21ec07c90 [0x7fff92f098f0]>{value = 18}
      "NSMnemonicLoc" => 2147483647
      "NSOnImage" => <CFKeyedArchiverUID 0x7fd21ec07c50 [0x7fff92f098f0]>{value = 14}
      "NSTitle" => <CFKeyedArchiverUID 0x7fd21ec09e40 [0x7fff92f098f0]>{value = 62}
    }
    62 => " Drag"
    63 => ""



61 is the key into the PLIST dictionary for the Drag item in the context menu of the ASC (schematic) dialog.
The value in this entry includes NSTitle (value 62) and NsKeyEquiv (value 63) - and NSKeyEquiv indicates a hot key.
Key 61 does not include NSKeyEquivModMask, which would set a key modifier mask (e.g. 1048576 means "Command", 131072 means Shift-Command).
62 is the key for the label of the Drag button.
63 (the value of NSKeyEquiv) is the key for the Unicode code point that corresponds to the hot key.

Key 63 contains the Unicode code point F70B (expressed in UTF-8 as "ef 9c 8b"), which is in a "private use" space in Unicode. This must correspond to the F8 key. I have been looking in the OSX development resources to find out how the conversion from the Event.h keycode 0x64 gets converted to F70B.

But for what it's worth, this is how and where to change the OSX hot keys for LTSpice. If someone gets further with it, please post here!
 

Offline cjheath

  • Contributor
  • Posts: 11
  • Country: au
Re: Where does LTspice keep its settings?
« Reply #8 on: April 03, 2019, 07:41:51 am »
An update: I used a binary file editor to change the displayed shortcut for "Wires" from F3 to "x", by modifying the value of the appropriate key in the NIB (plist) file, and it did change the displayed text - but LTSpice still responded to F3 not to "x".

I don't think the recognised values are set in the NIB file, but could be hard-wired in the code :(
 

Offline ono

  • Newbie
  • Posts: 2
  • Country: ch
Re: Where does LTspice keep its settings?
« Reply #9 on: December 16, 2021, 09:30:09 pm »
I just started playing with LTspice on Mac and the UI is very spartan and F2, F3 keybindings are really awkward for Mac users. So I also started looking into modifying LTspice shortcuts (as of course there is no toolbar and there is Key customization as on Windows) and then I found your post.
And unfortunately I confirm looking at LTspice disassembly that key handling (including function keys) is hardcoded in [ASCview keyDown:] method
[attachimg=1]

And it is not even possible to override function key mapping as it is driven by some index minus F2 key 16-bit unicode value  |O
 

Offline owiecc

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: dk
    • Google scholar profile
Re: Where does LTspice keep its settings?
« Reply #10 on: December 18, 2021, 02:13:13 pm »
I just started playing with LTspice on Mac [...] and unfortunately I confirm looking at LTspice disassembly that key handling (including function keys) is hardcoded in [ASCview keyDown:] method
That is a pretty hardcore way to start playing :) Maybe write an email to LTSpice support. They are quite responsive and maybe that is an easy fix for them.

For now take a look at Keyboard Maestro. Pretty easy to customise all the keystrokes. 
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 4248
  • Country: ro
Re: Where does LTspice keep its settings?
« Reply #11 on: December 18, 2021, 02:50:58 pm »
Most of the settings and keybindings can be configured from the LTspice GUI menu:

Tools -> Control Panel -> Drafting Options -> Hot Keys

Offline ono

  • Newbie
  • Posts: 2
  • Country: ch
Re: Where does LTspice keep its settings?
« Reply #12 on: December 18, 2021, 05:12:01 pm »
Most of the settings and keybindings can be configured from the LTspice GUI menu:
Tools -> Control Panel -> Drafting Options -> Hot Keys
The catch is that Hot Keys customization exists only on Windows :(
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 4248
  • Country: ro
Re: Where does LTspice keep its settings?
« Reply #13 on: December 18, 2021, 10:57:53 pm »
I'm running LTspice on Linux (Kubuntu 20.04 LTS), using the Windows version of LTspice installed on Linux with the help of WINE, and the keys customization is working just fine.

Wine project is available for either Linux and BSD, https://www.winehq.org/, so I guess it should also work on Mac.  I don't have a Mac, but you made me curious.

What happens if you install WINE on your Mac, then download LTspice for Windows, and open (run) the downloaded LTspice installer (.exe) using wine?

(from a terminal, type "wine LTspice64.exe", as a normal user, and that should install LTspice under wine)

Offline johan162

  • Newbie
  • Posts: 1
  • Country: se
Re: Where does LTspice keep its settings?
« Reply #14 on: March 22, 2022, 08:32:05 pm »
For those of you using the OSX version of LTSpice I have created a new theme manager available here:

https://github.com/johan162/ltspice-osx-themes

It makes it possible to both load a pre-defined theme for use in LTSpice but also save an existing configuration of LTSpice as a new theme. It comes with 5 different pre-defined themes as default . See preview of the themes here: https://github.com/johan162/ltspice-osx-themes#theme-reference-screenshots)

It is quite easy to use as the following two example show:

Example use to set the pre-defined color theme "softdark":
Code: [Select]
$> themeltspice.sh softdark

Example use to store the current color setting as the new theme "mytheme"
Code: [Select]
$> themeltspice.sh -d mytheme
 
The following users thanked this post: owiecc, RoGeorge

Offline owiecc

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: dk
    • Google scholar profile
Re: Where does LTspice keep its settings?
« Reply #15 on: March 24, 2022, 03:18:40 pm »
Great job. This will help me with syncing the theme across computers.
 

Offline elffuts

  • Newbie
  • Posts: 1
  • Country: us
Re: Where does LTspice keep its settings?
« Reply #16 on: May 02, 2022, 06:31:41 am »
The settings are in ...\User\AppData\Roaming\LTspiceXVII.ini

Any chance you might share that custom color scheme?
 
The following users thanked this post: RoGeorge

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 4248
  • Country: ro
Re: Where does LTspice keep its settings?
« Reply #17 on: May 02, 2022, 08:33:48 am »
The settings are in ...\User\AppData\Roaming\LTspiceXVII.ini

Any chance you might share that custom color scheme?

Thanks!   :-+

In Linux (Kubuntu 20.04 + WineHQ) that translates to
/home/$USER/.wine/drive_c/users/$USER/Application\ Data/LTspiceXVII.ini

Mine looks like this (without the [Recent File List] section, some keyboard shortcuts changed, too):
Code: [Select]
[Options]
Solver=1
ShowCheckSum=false
WorkingDirectory=C:\users\aaaa\My Documents\LTspiceXVII\OpAmp
SymbolSearchPath=
LibrarySearchPath=
SymbolSearchPathDisabled=false
LibrarySearchPathDisabled=false
SpicePriority=1
PlotPriority=1
LastFileTypeOpened=0
Tabstopwidth=4
grid=on
GenerateExpandedListing=false
DefaultTrtol=1
DefaultTrapIntegration=true
DefaultDoAntiTrapRinging=true
TSKbypass=false
Accept_3k4_Notation=true
NoJFETtempAdjIsr=false
SaveDeviceCurrents=true
SaveSubcircuitNodeVoltages=false
SaveSubcircuitDeviceCurrents=false
saveOneCurrentPerDevice=false
ShowSchematicGrid=false
OrthogonalDrag=false
AutoPan=false
DirectCompPinShorts=false
MinInductorDamping=true
UseClocktoReseedMC=false
EnableBetaOptimizations=false
BoldSchFont=false
ShowTitleBox=true
ReverseMouseWheelScroll=false
DefaultDeviceModels=true
DefaultDeviceLibraries=true
EnableWindowTabs=true
SchFontSize=34
SchematicFont=5
PenWidth=2
DataPenWidth=2
CursorThickness=1
WindowSize=1 1919 1054 2103
ToolBarIconSize=1
AutoSaveOnSim=0
MDIbackgroundImage=1
AutoDeleteRawFiles=0
DraftCursorType=0
FastAccessRAM=0.4
WaveformViewerFont=0
WaveformViewerFontSize=10
WaveformViewerBoldFont=true
UseXORcursor=false
RawCursorType=0
MonochromePrinting=true
NoGreekMus=false
RadianMeasure=false
DefaultTileType=true
UseRawTempDir=false
RawTempDir=
LastWebUpdateTime=1649498735
[Colors]
Grid=6579300
InActiveAxis=9868950
WaveColor0=0
WaveColor1=11513775
WaveColor2=65280
WaveColor3=65535
WaveColor4=255
WaveColor5=11513600
WaveColor6=16711935
WaveColor7=8421504
WaveColor8=32768
WaveColor9=11468800
WaveColor10=32943
WaveColor11=8388736
WaveColor12=128
WaveColor13=44975
SchematicColor0=65535
SchematicColor1=65535
SchematicColor2=65280
SchematicColor3=65535
SchematicColor4=12648447
SchematicColor5=16777215
SchematicColor6=16777215
SchematicColor7=16777215
SchematicColor8=65535
SchematicColor9=65535
SchematicColor10=16777010
SchematicColor11=16777215
SchematicColor12=0
SchematicColor13=3342335
NetlistNormalTextColor=0
NetlistCommentTextColor=32768
NetlistDotcmdTextColor=16711680
NetlistBackgroundColor=16777215
ContinuationLineColor=255
[SchKeyBoardShortCut]
Place_Component=P
Draw_Wire_Mode=W
Place_Netname=N
Delete_Mode=Ctrl+D
Duplicate_Mode=Ctrl+C
Move_Mode=M
Drag_Mode=D
Undo=Ctrl+Z
Redo=Ctrl+Shift+Z
Place_Comment_Text=T
Place_SPICE_Directive=S
Unconn_Pin_Marks=U
Text_Anchor_Marks=A
Place_Ground=G
Place_Resistor=R
Place_Capacitor=C
Place_Inductor=L
Place_Diode=Shift+D
Draw_Lines=(none)
Draw_Rectangles=(none)
Draw_Circles=(none)
Draw_Arcs=(none)
Reset_T_0=0 )
Schematic_Grid=Ctrl+G
Rotate=Ctrl+R
Mirror=Ctrl+M
Zoom_Area=Z
Zoom_Back=Back Space
Halt_Simulation=Ctrl+H
Run_Simulation=F5
Place_BUS_Tap=(none)
Zoom_to_Fit=Space
View_SPICE_Error_Log=Ctrl+L
Place_Voltage_Source=V
[AsyKeyBoardShortCut]
Object_Anchors=O
Place_Pin=P
Delete_Mode=F5
Duplicate_Mode=F6
Move_Mode=F7
Drag_Mode=F8
Undo=Ctrl+Z
Redo=Ctrl+Shift+Z
Place_Comment_Text=T
Draw_Lines=L
Draw_Rectangles=R
Draw_Arcs=A
Draw_Circles=C
Rotate=Ctrl+R
Mirror=Ctrl+E
Attribute_Editor=Ctrl+A
Attribute_Window=Ctrl+W
Zoom_Back=Back Space
Zoom_In=Z
Zoom_to_Fit=Space
Show_Pin_Table=(none)
[RawKeyBoardShortCut]
Zoom_Extents=Space
Zoom_Area=Z
Zoom_Back=Back Space
Vertically_Autorange=Y
Toggle_Grid=Ctrl+G
Delete_Mode=Ctrl+D
Add_Trace=Insert
Add_Pane=Ctrl+N
Undo=Ctrl+Z
Redo=Ctrl+Shift+Z
Run_Simulation=(none)
Halt_Simulation=Ctrl+H
Open_Plot_Settings_File=Ctrl+O
Reload_Plot_Settings_File=Ctrl+R
Label_cursor_position=L
Place_text_on_the_plot=T
Draw_an_arrow_on_the_plot=A
Draw_a_line_on_the_plot=F3
Draw_a_box_on_the_plot=(none)
Draw_a_circle_on_the_plot=(none)
Annotation_Line_Style/Color=(none)
Copy_Plot_Annotations=Ctrl+C
Move_Plot_Annotations=M
Drag_Plot_Annotations=D
Select_Steps=S
View_SPICE_Error_Log=Ctrl+L
Redraw_Window=F5
[NetKeyBoardShortCut]
Goto_Line_Number=Ctrl+G
Run_Simulation=Ctrl+R
Pause_Simulation=(none)
Halt_Simulation=Ctrl+H
Undo=F9
Redo=Shift+F9
View_SPICE_Error_Log=Ctrl+L


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf