bindkey for plotting not easy

S

Svenn Are Bjerkem

Guest
Hi,

I am trying to bind the plotting of the cellview in the current active
window to ctrl-p. I observe that if I go down the hierarchy and press
ctrl-p then actually the top level is printed. I also have problem
getting true landscape, that is landscape plot on landscape paper.
Cadence seem to like landscape plot on portrait paper which require
separate rotate 90 degrees when creating redable pdf.

also seems that schPlot is really picky on what is in that
schPlotOptions list. I first saved to a template and then used that
template file as a template for this hardcoded list. I do not really
want to have a lot of template files around. Just being a mess in
multi-user environments....

Here is the code that I have so far:

(procedure (SABplotWindow winId)
(let (dbId t_libName t_cellName t_viewName t_fileName t_rootPath)
(setq dbId (deGetCellView winId))
(setq t_libName dbId->libName)
(setq t_cellName dbId->cellName)
(setq t_viewName dbId->cellViewType)

(setq t_rootPath (getShellEnvVar "HOME"))
(setq t_fileName (buildString (list t_libName t_cellName t_viewName)
"_"))
(setq t_fileName (buildString (list t_fileName "ps") "."))
(setq t_fileName (buildString (list t_rootPath "plot" t_fileName)
"/"))
(printf "fileName: %L\n" t_fileName)
(printf "libName: %s, cellName: %s, viewName: %s\n" t_libName
t_cellName t_viewName)
(setq schPlotOptions (list nil
'library t_libName
'cell t_cellName
'view t_viewName
'version "0.0"
'scope "/" ; text field, "/" should be the default.
'header nil ; set when "Plot Header" is set.
'copy 1
'outputfile t_fileName

'hierarchy nil
'hierleveldown 0
'multisheet nil
;;'plot "current window"
'plot "cellview"
;;'bBox '((0.0 0.0) (15.00 8.00))
'bBox nil
'area "area fit"
'fullarea t
'noteText ""
'grid nil
'indexsheet t
'notes nil
'header nil
'plotToFile t
'mailto "sb0057"
'display "display"
'vsheets 1
'hsheets 1
'pagecount 1
'nullpage nil
'paperdim '(189.8 201.4 )
'papersize "A4"
'resolution 600
'plotterType "postscript1"
'plotter "RicohPrinterA4"
'fit t
'time "now"
'tmpdir "/usr/tmp"
'copy 1
'unit "mm"
;;'scale 0.992174
'center t
'mail nil
'orientation "landscape"
'offset '(0.0 0.0)
'plotsize '( 201.4 270.8)

))
(schPlot nil winId)
)
)

--
Svenn
 
On Jul 30, 9:01 am, Svenn Are Bjerkem <svenn.bjer...@googlemail.com>
wrote:
Hi,

I am trying to bind the plotting of the cellview in the current active
window to ctrl-p. I observe that if I go down the hierarchy and press
ctrl-p then actually the top level is printed. I also have problem
getting true landscape, that is landscape plot on landscape paper.
Cadence seem to like landscape plot on portrait paper which require
separate rotate 90 degrees when creating redable pdf.

also seems that schPlot is really picky on what is in that
schPlotOptions list. I first saved to a template and then used that
template file as a template for this hardcoded list. I do not really
want to have a lot of template files around. Just being a mess in
multi-user environments....

Here is the code that I have so far:

(procedure (SABplotWindow winId)
(let (dbId t_libName t_cellName t_viewName t_fileName t_rootPath)
(setq dbId (deGetCellView winId))
(setq t_libName dbId->libName)
(setq t_cellName dbId->cellName)
(setq t_viewName dbId->cellViewType)

(setq t_rootPath (getShellEnvVar "HOME"))
(setq t_fileName (buildString (list t_libName t_cellName t_viewName)
"_"))
(setq t_fileName (buildString (list t_fileName "ps") "."))
(setq t_fileName (buildString (list t_rootPath "plot" t_fileName)
"/"))
(printf "fileName: %L\n" t_fileName)
(printf "libName: %s, cellName: %s, viewName: %s\n" t_libName
t_cellName t_viewName)
(setq schPlotOptions (list nil
'library t_libName
'cell t_cellName
'view t_viewName
'version "0.0"
'scope "/" ; text field, "/" should be the default.
'header nil ; set when "Plot Header" is set.
'copy 1
'outputfile t_fileName

'hierarchy nil
'hierleveldown 0
'multisheet nil
;;'plot "current window"
'plot "cellview"
;;'bBox '((0.0 0.0) (15.00 8.00))
'bBox nil
'area "area fit"
'fullarea t
'noteText ""
'grid nil
'indexsheet t
'notes nil
'header nil
'plotToFile t
'mailto "sb0057"
'display "display"
'vsheets 1
'hsheets 1
'pagecount 1
'nullpage nil
'paperdim '(189.8 201.4 )
'papersize "A4"
'resolution 600
'plotterType "postscript1"
'plotter "RicohPrinterA4"
'fit t
'time "now"
'tmpdir "/usr/tmp"
'copy 1
'unit "mm"
;;'scale 0.992174
'center t
'mail nil
'orientation "landscape"
'offset '(0.0 0.0)
'plotsize '( 201.4 270.8)

))
(schPlot nil winId)
)
)

--
Svenn


Try: deGetEditCellView instead of deGetCellView to plot the current
level
 
On Jul 30, 10:32 pm, noopster <noo...@gmail.com> wrote:
On Jul 30, 9:01 am, Svenn Are Bjerkem <svenn.bjer...@googlemail.com

Here is the code that I have so far:

(schPlot nil winId)
)
)

--
Svenn

Try: deGetEditCellView instead of deGetCellView to plot the current
level
Hi, thanks for the Idea, but for whatever reason, that didn't work, so
I read the manual a bit more and did some experimenting with different
stack levels etc. The cell names of the plots changed, but the
contents was always the same, the toplevel.

Then I just tried one last desperate try and did a
(schPlot nil dbId)
instead. The manual says that I sould use a window id, like that
returned from the window() command, but it never hurts to try some
other objects on those commands, and really, the hack works!!! The
only change I did to the original code was to replace that winId with
the dbId in the last schPlot() call.

Maybe somebody from Cadence can explain why?

But now I have finally the bindkey I have been dreaming about for 10
years: Plotting to file without using that cumbersome dialog!!! Oh,
happy day. Maybe I should patent it? :)

Regards,
--
Svenn
 

Welcome to EDABoard.com

Sponsor

Back
Top