BookmarkSubscribe
Choose Language Hide Translation Bar
Acatou
New Contributor

Vb axisboxaddrefline cannot work

Hello jmp community
I used VB to do the oneway analysis, but axisaddrefline couldn't draw the reference line
This function returns ”False“ all the way
Set tss = jmp_doc.CreateOneway
tss.LaunchAddX "class"
tss.LaunchAddY "weight"
a = tss.Launch
tss.AxisBoxAddRefLine 1, 70, 1, 3
yor help would be greatly appreciated
Thanks
0 Kudos
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted

Re: Vb axisboxaddrefline cannot work

The JMP display box for the axis must first be obtained.  Then it can be used to specify the ref line.  Here is an example of a horizontal line on a Oneway analysis, along with a picture of the result.

 

Brian Corcoran

JMP Development

 

Dim hand1 As Integer

'dt is a data table object for Big Class.jmp that was already opened.  Doc is the document pointer from dt
dt.Activate()
OnewayObj = Doc.CreateOneway
OnewayObj.LaunchAddY("Height")
OnewayObj.LaunchAddX("Sex")
OnewayObj.Launch()
hand1 = OnewayObj.GetGraphicItemByType("AxisBox", 1)
OnewayObj.AxisBoxAddRefLine(hand1, 60.0, JMP.axisLineRefConstants.axisLineRefSolid, JMP.jmpColorConstants.jmpColorGreen)

Re: Vb axisboxaddrefline cannot work

I'm sorry, but it looks like the display option for Legend is not available in automation.  I've added it for JMP 15.  Even then, it will only turn it on or off, not allow you to change the legend.

 

Brian Corcoran

JMP Development

 

 

0 Kudos
4 REPLIES 4
Highlighted

Re: Vb axisboxaddrefline cannot work

The JMP display box for the axis must first be obtained.  Then it can be used to specify the ref line.  Here is an example of a horizontal line on a Oneway analysis, along with a picture of the result.

 

Brian Corcoran

JMP Development

 

Dim hand1 As Integer

'dt is a data table object for Big Class.jmp that was already opened.  Doc is the document pointer from dt
dt.Activate()
OnewayObj = Doc.CreateOneway
OnewayObj.LaunchAddY("Height")
OnewayObj.LaunchAddX("Sex")
OnewayObj.Launch()
hand1 = OnewayObj.GetGraphicItemByType("AxisBox", 1)
OnewayObj.AxisBoxAddRefLine(hand1, 60.0, JMP.axisLineRefConstants.axisLineRefSolid, JMP.jmpColorConstants.jmpColorGreen)

Acatou
New Contributor

Re: Vb axisboxaddrefline cannot work

I appreciate your help!

It can work very well now,

But I have one last question,

I want to add a legend to my Oneway, but I can't find a function in Oneway's class

could you help me?

0 Kudos

Re: Vb axisboxaddrefline cannot work

I'm sorry, but it looks like the display option for Legend is not available in automation.  I've added it for JMP 15.  Even then, it will only turn it on or off, not allow you to change the legend.

 

Brian Corcoran

JMP Development

 

 

0 Kudos
Acatou
New Contributor

Re: Vb axisboxaddrefline cannot work

OK ,I get it,

Thanks a lot!

0 Kudos