The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 29th, 2024, 4:23am
Pages: 1
Send Topic Print
Capturing wave forms from ocean/skill (Read 4022 times)
gzatorre
New Member
*
Offline



Posts: 2

Capturing wave forms from ocean/skill
Aug 11th, 2009, 1:15am
 
Hi every body,

I am developing an ocean script that plots some data and I want to capture the wave form window automatically. To do it I am trying to use:
    window=newWindow()
    currentWindow(window)
    plot( Vout ?expr '( "Vout" ) )
    system(strcat("xwd -out " out_file " -name " window ))

It does not work because the window variable is "window type". In fact, if you write this in ocean:
  strcat("hola" window )
You will have this
  *Error* strcat: argument #2 should be either a string or a symbol (type template = "S") - window:2

Is there any way to convert a "window type" variable to "string type"? Even more, is there any other way to capture the wave form window?

Thank you in advance

Best regards

Guillermo
Back to top
 
« Last Edit: Aug 11th, 2009, 3:44am by gzatorre »  
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: Capturing wave forms from ocean/skill
Reply #1 - Aug 15th, 2009, 6:52am
 
Well, you could get the window ID as a string, but it's not going to help you because it is not the X window ID. For example:

window->windowNum will return the window number.

The best solution is to make sure you're using Wavescan rather than AWD as your waveform tool. Then you can use:

hardCopyOptions(?hcOutputFile "waveform.png")
hardCopy()

If the filename has the suffix .png, .tif, .tiff or .bmp then a bitmap image will get created from the window contents (the same as File->Save As Image menu).

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.