turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Assigning values to a JMP.bivarFitTransformConstan...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Nov 19, 2015 9:51 AM
(1029 views)

I am automating JMP using C#. I am trying to get a Bivariate Fit Y by X Analysis with a Log Fit. ( The curve I want to use as a fit is: y = a + b*ln(x) )

I have:

JMP.Application myJMP;

JMP.Bivariate biv;

JMP.Document doc;

JMP.bivarFitTransformConstants Xtransform;

JMP.bivarFitTransformConstants Ytransform;

doc = myJMP.OpenDocument(excelFilePath);

And I think the correct function to call would be:

biv.FitTransformed(Xtransform, Ytransform, 1);

The only problem I have is I am not able to assign values for the bivarFitTransformConstants '**Xtransform'** and '**Y****transform'**. I can see in the JMP Automation Reference for the Bivariate Platform Constants that the possible Values are: None, Log, Sqrt, Square, Reciprocal and Exp.

I have tried:

Xtransform = Log;

Xtransform = "Log";

Xtransform = (JMP.bivarFitTransformConstants) "Log";

Xtransform = myJMP. (Here, I could not find the appropriate function to use to assign the value 'Log' to Xtransform.

Xtransform.Equals(Log);

Xtransform.Equals("Log");

None of these options work, and the Common message is that "I cannot convert 'string' to 'JMP.bivarFitTransformConstants' ".

What is the correct way to assign values to the JMP.bivarFitTransformConstants ?

Help is appreciated!

1 REPLY

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Dec 4, 2015 9:03 AM
(926 views)

**I found this syntax for FitTransformed in the Automation reference for C#:**

FitTransformed(Xtransform As Integer, Ytransform as Integer, PolynomialDegree as Integer)

**This shows it as accepting integer types for all three parameters. However, the X and Y Transform are indeed in the JMP.bivarFitTransformConstants object type. However, when you try to cast your Xtransform with the value "Log," it is throwing you an error. This is because it is looking for the integer value of the constant.**

**You can assign the value of Xtransform and YTransform in the following way:**

Xtransform = (JMP.bivarFitTransformConstants) 1;

Ytransform = (JMP.bivarFitTransformConstants) 1;

**Here is a list of what these constants are mapped to:**

0 = None;

1 = Log

2 = Sqrt

3 = Square

4 = Reciprocal

5 = Exp

**I have attached a text file of a full code example of a bivariate analysis with FitTransformConstants.**

Justin