Missing commands for calibre query and tcl shell

I am trying to do some scripting using a svdb directory as input for query server. Currently, I am missing two features:

1) the RVE allows me to get infos on an instance if I type in its path. In particular, I am interested in knowing the layout cell name of the instance. I cannot find equivalent commands for the query server AND the tcl shell. Do they exist?

2) query server has a NET PORTNAMES but I cannot find an equivalent tcl command? Does it exist?

In the Query Server documentation, if a standard Query Server command has a Tcl shell equivalent, the standard command's reference page says so at the start of the page. For example, this is at the top of the LVS SETTINGS REPORT WRITE page:

PLACEMENT INFO gives you the cell name corresponding to a layout instance path. The cell name appears on the second line of the response from the command. There is no corresponding Tcl shell command for this one.

Another command that may be of interest in this circumstance is PLACEMENT LAYOUT. If your instance path is from a source instance, this command will give you the corresponding layout instance path (if it was matched by LVS). Once you have that, PLACEMENT INFO can give the cell name of the instance.

thanks for the answer. PLACEMENT INFO tells me exactly what I need. PLACEMENT LAYOUT is of no use in this case because I do not have a source.

A quick background note: we have a GDS file but we do not have a netlist of its schematic. We ran a "fake" LVS just to have a queryable SVDB (and a many GBs report file as a byproduct). Calibredrv loads the GDS fine, RVE likes this SVDB and we can extract all the information we need. Since we want to work command-line only, we need a command-line equivalent of everything that can be done via the GUI (NET TRACE, NET PORTNAMES and PLACEMENT INFO are enough for this scenario, but things may change in the future).

Actually, there is another thing we would like to have. Basically, an inverse operation of PLACEMENT INFO. From a cell name, I would like to have all the layout instance paths that correspond to that cell name. Currently, we use LAYOUT HIERARCHY WRITE, we flatten the file that is written by the command and we grep for the cell name.

Last thing, we want to script this whole flow, but it is sad that there is not a Tcl function for every calibre query command. Bottom line: we are writing a Perl library that sends the commands to calibre -query's stdin and parses the information written on stdout.