DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

o2DCurve.Shape.XChannel.Reference & Joint x-axis setting

Solved!
Go to solution

Hello,

 

I'm on Diadem 2012 and do a lot of calculations in VBS that save some time. As a cherry on top there is a generator that loads TDR report file and inserts data from channels as curves.

 

o2DCurve.Shape.XChannel.Reference that should insert the correct channel. However it does not:

I spotted the problem in the second it uploaded here...

 

CurveAndAxisDefinition.png

 

This is caused by the "Joint x-channel" checkbox in lower-left. Is there a property that changes that? Right click in Report>Copy as Script does not show anythig of related name (to my eagle eye at least).

 

 

 

 

Download All
0 Kudos
Message 1 of 3
(4,444 Views)
Solution
Accepted by cubz

Hello cubz,

 

I think this might be the parameter you are looking for:

 

Report.ActiveSheet.Objects.Item.Settings.UseCommonXChannel = False

Example code (will delete your existing layout):

 

Dim oMy2DAxisSystem, oMyPos, oMy2DCurve1, oMy2DCurve2
Call Report.NewLayout()
Set oMy2DAxisSystem = Report.ActiveSheet.Objects.Add(eReportObject2DAxisSystem, "My2DAxisSystem")
Set oMyPos = oMy2DAxisSystem.Position.ByCoordinate
oMyPos.X1 = 20
oMyPos.X2 = 80
oMyPos.Y1 = 20
oMyPos.Y2 = 80
Set oMy2DCurve1 = oMy2DaxisSystem.Curves2D.Add(e2DShapeLine, "MyNew2DCurve1")
Set oMy2DCurve2 = oMy2DaxisSystem.Curves2D.Add(e2DShapeLine, "MyNew2DCurve2")
oMy2DCurve1.Shape.XChannel.Reference = "[1]/[1]"
oMy2DCurve1.Shape.YChannel.Reference = "[1]/[2]"
oMy2DCurve2.Shape.YChannel.Reference = "[1]/[3]"
oMy2DAxisSystem.Settings.UseCommonXChannel = True
Call Report.Refresh()

I hope that's helpful,

 

     Otmar

Otmar D. Foehner
0 Kudos
Message 2 of 3
(4,429 Views)

Hi Otmar,

 

yes, that's it. Thanks, now I can generate more of the reports without worries for the .TDR!

 

P.S: Friday note: the eReportObject2DAxis​System is wrong when one copypaste the code you posted directly into Diadem.

 

Cheers,

c.

0 Kudos
Message 3 of 3
(4,418 Views)