DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically drawing a surface on REPORT

Solved!
Go to solution

Hi everyone,

 

I would like to display a surface based on 3 three different channels, but the following code displays nothing but axises:

 

Call GraphDeleteAll()
Call GraphObjNew("3D-Axis", "3DAxis")
Call GraphObjOpen("3DAxis")
Call GraphObjNew("3D-Curve", "3DGraph")
Call GraphObjOpen("3DGraph")

D3CChnX= PChanNb
D3CChnY = XChanNb
D3CChnZ = YChanNb
D3CCurveCDType = "Surface"
D3CrvCDAddSurf = True

D3AXISTOP        = 20
D3AXISBOTTOM     = 50
D3AXISLEFT       = 20
D3AXISRIGHT      = 50

Call GraphObjClose("3DGraph")
Call PicUpdate

 I have tried the name-oriented method as well, this does exactly the same thing. I have lost hours trying to find what could be the mistake here but I could not find anything, I do not understand why this code does not work.

I hope someone will see what is missing. Thank you !

0 Kudos
Message 1 of 3
(5,548 Views)
Solution
Accepted by topic author Near3

Hi Near,

 

It looks like you were just missing that second object close statement.  This works on my computer:

 

Call GraphDeleteAll()
Call GraphObjNew("3D-Axis", "3DAxis")
Call GraphObjOpen("3DAxis")
  Call GraphObjNew("3D-Curve", "3DGraph")
  Call GraphObjOpen("3DGraph")
    D3CChnX = XChanNb
    D3CChnY = YChanNb
    D3CChnZ = PChanNb
    D3CCurveCDType = "Surface"
    D3CrvCDAddSurf = True
    D3AXISTOP      = 20
    D3AXISBOTTOM   = 50
    D3AXISLEFT     = 20
    D3AXISRIGHT    = 50
  Call GraphObjClose("3DGraph")
Call GraphObjClose("3DAxis")
Call PicUpdate

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 2 of 3
(5,518 Views)

Oh thank you Brad, I cannot believe that I have been wasting so many hours for such a stupid mistake...

Thanks

0 Kudos
Message 3 of 3
(5,502 Views)