DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Channel copy within VBS- Kanalbereiche kopieren in VBS

Hello,
diadem 9 doesn't provide a autosequence "areacopy" as diadem 8 did. How can i include areacopy in an autosequence in diadem 9? TNX
gnometto
-----------------------------------------------------------------------------
(gnometto tutto, mica un pezzetto!!!)
0 Kudos
Message 1 of 7
(4,374 Views)
Hi

Command: DataBlCopy
The DataBlCopy command replaces the DataAreaCopy command. (The old command still works)
Copies a data block from channels and inserts the data block into other channels. DIAdem overwrites existing values.

Command: DataBlClpCopy
The DataBlClpCopy command replaces the DataAreaClpCopy command.(The old command still works)
Copies a data block from channels into the clipboard.

Hope this helps
Winfried
0 Kudos
Message 2 of 7
(4,367 Views)
I’ve already found this command, but I can’t make it work as I wish.
I need a subsequence with interaction, where I can select on the view window the area I want to copy.
Diadem 8.1 example:



Call VIEWLAYOUTLOAD("view_to_set_cursor .LVD") '... VIEWFILE



call ViewCursTypeset("Band")



Call ViewCursPosSet(3.0576,0,19.3539,0) '



Call ViewUpdate() '

call interactionon

Call ScriptStart("areacopy","")

how can i do that within diadem 9.1 vbs?
tnx for your help!!!
gnometto
-----------------------------------------------------------------------------
(gnometto tutto, mica un pezzetto!!!)
0 Kudos
Message 3 of 7
(4,366 Views)
Hi

The AreaCopy script does not exist in 9.x but the functionality is still available. Perhaps this script helps you as a first step. Or you call the copy function in VIEW interactively.

Call VIEW.LoadLayout("view_to_set_cursor .LVD")
VIEW.ActiveSheet.Cursor.Type="Band"
Set SheetObject=VIEW.Sheets(1)
SheetObject.Cursor.X1=3.0576
SheetObject.Cursor.Y1=0
SheetObject.Cursor.X2=19.3539
SheetObject.Cursor.Y2=0
Set SheetObject=nothing
Call VIEW.Refresh()
Call wndshow("view")
call interactionon
set oMyCurve = View.Sheets(1).Areas(1).DisplayObj.LeadingCurve
ixChnNo = oMyCurve.XChannelNumber
iyChnNo = oMyCurve.yChannelNumber
iX1Value = pno(oMyCurve.XChannelName, VIEW.Sheets(1).Cursor.X1)
iX2Value = pno(oMyCurve.XChannelName, VIEW.Sheets(1).Cursor.X2)
msgbox iX1Value & " " & iX2Value
call chnalloc ("x_copy")
call chnalloc ("y_copy")
call DataBlCopy(ixChnNo, iX1Value, iX2Value - iX1Value, "x_copy",1)
call DataBlCopy(iyChnNo, iX1Value, iX2Value - iX1Value, "y_copy",1)


Winfried
Message 4 of 7
(4,354 Views)
It works well!!!

How can I set the flags automatically for the selected area?

Furthermore, i have to expand this for the copy of more channels in the same window, and to give the name X_copy_channelname Y_copy_channelname to every copied channel.....

why diadem 9.X doesn't support the old commands of diadem 8.X?

Thank you for your quick and competent support!
gnometto
-----------------------------------------------------------------------------
(gnometto tutto, mica un pezzetto!!!)
0 Kudos
Message 5 of 7
(4,352 Views)
Hi Gnommeto

Try this


Call VIEW.LoadLayout("view_to_set_cursor .LVD")
VIEW.ActiveSheet.Cursor.Type="Band"
Set SheetObject=VIEW.ActiveSheet
SheetObject.Cursor.X1=3.0576
SheetObject.Cursor.Y1=0
SheetObject.Cursor.X2=19.3539
SheetObject.Cursor.Y2=0
Call VIEW.Refresh()
wndshow("view")
call interactionon
For Each oMyCurve in SheetObject.ActiveArea.DisplayObj.Curves
i=i+1
ixChnNo = oMyCurve.XChannelNumber
iyChnNo = oMyCurve.yChannelNumber
iX1Value = pno(oMyCurve.XChannelName, SheetObject.Cursor.X1)
iX2Value = pno(oMyCurve.XChannelName, SheetObject.Cursor.X2)
call chnalloc ("x_copy" & i)
call chnalloc ("y_copy" & i)
call DataBlCopy(ixChnNo, iX1Value, iX2Value - iX1Value, "x_copy" & i,1)
call DataBlCopy(iyChnNo, iX1Value, iX2Value - iX1Value, "y_copy" & i,1)
Next


Winfried

What is the meaning of gnometto tutto, mica un pezzetto!!!
Message 6 of 7
(4,343 Views)
Danke, funktioniert prima!
gnometto
-----------------------------------------------------------------------------
(gnometto tutto, mica un pezzetto!!!)
0 Kudos
Message 7 of 7
(4,333 Views)