I see to operate on a chart axis for example I need to get a handle to it. I assume GetGraphicItemByName is the way this is done. But, where do the correct names come from please?
When you have an output from JMP, you can take a look at the report output objects and their names by right clicking on the gray triangle next to the outline box for the object you are interested in and selecting to Show the Tree Structure
Here is the displayed tree structure
If the Y axis is the axis you want, you would refer to it by the name, Axis Box(1).
Using
Help==>Scripting Index
and looking up Axis Box, you will see the way to make changes to the AxisBox, and all of the different items you can change, along with an actual code example
Hi Jim,
I appreciate your response.
I must work in VBA. it is a distribution. If I am understanding the horizontal axis is axis box(4).
I have tried several permutations of this, caps, no caps, space no space.
Each time JMP crashes.
Any help is greatly appreciated
Hi Matt,
You want to use GetGraphicItemByType . You can specify the index for the item that you want there. The Analysis.NET example that ships in the VB examples can show you. Look under the Display Tree Operations button. A snippet from there:
h2 = Distrib.GetGraphicItemByType("Outline Box", 1)
Distrib.OutlineBoxSetTitle(h2, "MyTitle")
GetGraphicItemByName can be used to get things like Outline nodes that have distinctive names in them, like "More Moments" or "Summary Statistics". If there are more than one display object with that name, you will likely get the first.
The operations that can be performed once you have the handle to your graphic item are dictated by the item type. The methods that you can call are often prefixed by that type, like OutlineBoxSetTitle can be used on Outline Boxes or in your case AxisBoxScale. Please note that in your case, you cannot do anything to the Axis until after the Launch operation is performed. There are no display boxes until you actually do that launch, so there is no box that can be returned by GetGraphicItemByType until after Launch is called.
I hope that helps.
Brian
Thank you very much.