set full path for untitled schematic / symbol name

This commit is contained in:
Stefan Schippers 2020-08-27 11:39:12 +02:00
parent 38a76d463e
commit f1c836fef6
3 changed files with 29 additions and 6 deletions

View File

@ -1,3 +1,26 @@
2.9.8
- LCC function (Local Custom Cell):
schematics (.sch) can be instantiated just like symbol (.sym) files in a parent schematic.
- Open Recent menu entry to quickly open recent edited/saved files.
- when descending into vector instances (example: x1[7:0]) ask in which instance to descend
(example: x1[2]). This is needed to correctly build the hierarchy paths and to send correct
signal names to spice waveform viewers. This also allows to follow single bits of bussed
signals thru the hierarchy.
- symbol attribute @symname will display symbol name without extension as it used to be
in earlier versions. @symname_ext will print full rootname of symbol.
Some doc updates on symbol attributes
- changed tcl procs abs_sym_path and rel_sym_path, now the real symbol filename is obtained by
prepending one of the XSCHEM_LIBRARY_PATH paths until the symbol is found.
This allows more than one directory levels in symbol references.
- when copying a symbol with edit_property dialog ("q" key) and enabling "Copy cell" if a relative
path name is supplied for new symbol it will inherit the same path prefix as the original symbol.
- edit property dialog box has a (combobox in tk slang) token selector, so if a specific token
is set the text edit will be restricted to that token value instead of the whole attribute string.
- snap and grid entries in main window will not annoyingly receive keyboard focus with TAB key
- implemented text attributes "hcenter=true" (center text in reading direction) and
"vcenter=true" (center text in direction perpendicular to reading direction).
These can both be set for full centered text block.
2.9.7
- store symbol wires (if any) as Instdef lines on layer WIRELAYER (1) so they are visible when instances are placed.
- spice netlister: if ".param m=10 n=5" is given and "R1[m:n]" instance name is present resolve parameters

View File

@ -972,8 +972,8 @@ void load_schematic(int load_symbols, const char *filename, int reset_undo) /* 2
else my_snprintf(name, S(name), "%s-%d.sch", "untitled", i);
if(stat(name, &buf)) break;
}
my_strncpy(schematic[currentsch], name, S(schematic[currentsch]));
my_strncpy(current_name, rel_sym_path(schematic[currentsch]), S(current_name)); /* 20190519 */
my_snprintf(schematic[currentsch], S(schematic[currentsch]), "%s/%s", pwd_dir, name);
my_strncpy(current_name, name, S(current_name)); /* 20190519 */
}
if(has_x) { /* 20161207 moved after if( (fd=..)) */
if(strcmp(get_cell(schematic[currentsch],1), "systemlib/font")) {

View File

@ -406,8 +406,8 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
else my_snprintf(name, S(name), "%s-%d.sym", "untitled", i);
if(stat(name, &buf)) break;
}
my_strncpy(schematic[currentsch], name, S(schematic[currentsch]));
my_strncpy(current_name, rel_sym_path(schematic[currentsch]), S(current_name));
my_snprintf(schematic[currentsch], S(schematic[currentsch]), "%s/%s", pwd_dir, name);
my_strncpy(current_name, name, S(current_name));
current_type=SYMBOL;
} else {
for(i=0;;i++) {
@ -415,8 +415,8 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
else my_snprintf(name, S(name), "%s-%d.sch", "untitled", i);
if(stat(name, &buf)) break;
}
my_strncpy(schematic[currentsch], name, S(schematic[currentsch]));
my_strncpy(current_name, rel_sym_path(schematic[currentsch]), S(current_name));
my_snprintf(schematic[currentsch], S(schematic[currentsch]), "%s/%s", pwd_dir, name);
my_strncpy(current_name, name, S(current_name));
current_type=SCHEMATIC;
}
draw();