Subscribe Bookmark RSS Feed

I'm programming jmp through excel vba to generate Oneway charts:

pjm

Community Trekker

Joined:

Feb 5, 2015

I have successfully created the desired Oneway chart.  Unfortunately, I have not been able to figure out the syntax necessary to set items like axis labels and chart title. Attempts at using "GetGraphicItemsByType" and "AxisBoxAddLabel" have been largely unsuccessful.  Your help would be greatly appreciated.  Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

AxisBoxAddLabel puts a label either below (X) or to the side (Y) of the axis name in the graphic.  It does not replace the original name.  There is not an automation function to do that.  If you really need a different name and it must be through automation, I would suggest changing the variable name in the data table through automation (Name property) before launching the analysis.

If the existing AxisBoxAddLabel IS what you need, here is an example from Bivariate that uses it:

  Bivar.Launch()

    handleY = Bivar.GetGraphicItemByType("AxisBox", 1)

  handleX = Bivar.GetGraphicItemByType("AxisBox", 2)

  Bivar.AxisBoxAddLabel(handleY, "This is the Y Axis")

  Bivar.AxisBoxAddLabel(handleX, "X Marks the Spot")

Brian Corcoran

3 REPLIES
Solution

AxisBoxAddLabel puts a label either below (X) or to the side (Y) of the axis name in the graphic.  It does not replace the original name.  There is not an automation function to do that.  If you really need a different name and it must be through automation, I would suggest changing the variable name in the data table through automation (Name property) before launching the analysis.

If the existing AxisBoxAddLabel IS what you need, here is an example from Bivariate that uses it:

  Bivar.Launch()

    handleY = Bivar.GetGraphicItemByType("AxisBox", 1)

  handleX = Bivar.GetGraphicItemByType("AxisBox", 2)

  Bivar.AxisBoxAddLabel(handleY, "This is the Y Axis")

  Bivar.AxisBoxAddLabel(handleX, "X Marks the Spot")

Brian Corcoran

pjm

Community Trekker

Joined:

Feb 5, 2015

Hi Brian,

Thank you; your quick response was very helpful.

The clarification that the axis label cannot be changed through automation and the corresponding work around tip saved me a great deal of time. It is working well.

Also, I am successfully setting the title with the following:

handleO = Oneway.GetGraphicItemByType("OutlineBox", 1)

Oneway.OutlineBoxSetTitle handleO, str

I have noticed that some items can be controlled through both command statements and function statements, and that the syntax is considerably different between the two. For instance, the command form to set the ‘OutlineBoxSetTitle’ is identified above while the corresponding function form would be: tmp = Oneway.OutlineBoxSetTitle(handleO, str). The Object Browser in this case identified the function version. Is a document available that can provide more details on VBA syntax used to automate JMP?

Thanks

briancorcoran

Joined:

Jun 23, 2011

There is a full Automation Reference guide installed in the Documentation folder (C:\Program Files\SAS\JMP\11\Documentation for the default).

Brian Corcoran
JMP Development