Axis mode control by AddOn

Tecplot's Add-on Developer's Kit

Moderators: davetaflin, salter, steve, jprenaud, straton, Chris Idso

regina
Experienced user
Posts: 18
Joined: Mon May 14, 2007 1:15 am
Location: france
Contact:

Axis mode control by AddOn

Postby regina » Fri Jun 01, 2007 12:29 am

Hi,

I would like to set the AxisMode of a Cartesian2D plot to "Independent" by my AddOn. I could'nt figure out which function to use for this.

any ideas?
thank's,

Regina

jim

Re: Axis mode control by AddOn

Postby jim » Sun Jun 03, 2007 7:42 am

Maybe someone will jump in with a better way of doing this, but a cheesy option is to feed Tecplot the macro command to do this.

Code: Select all

    retval = TecUtilMacroExecuteCommand("$!TWODAXIS AXISMODE = INDEPENDENT");

regina
Experienced user
Posts: 18
Joined: Mon May 14, 2007 1:15 am
Location: france
Contact:

Re: Axis mode control by AddOn

Postby regina » Sun Jun 03, 2007 11:49 pm

It works, but it's a bit strange to use a macro command inside an AddOn ...

Thanks,

Regina

Ben

Re: Axis mode control by AddOn

Postby Ben » Tue Jun 05, 2007 11:30 am

I believe you'll have to use the low level style setting routine. Something like this should work:

Code: Select all

ArgList_pa ArgList = TecUtilArgListAlloc();

TecUtilArgListAppendString(ArgList, SV_P1, SV_TWODAXIS);
TecUtilArgListAppendString(ArgList, SV_P2, SV_AXISMODE);
TecUtilArgListAppendArbParam(ArgList,SV_IVALUE, AxisMode_Independent);
SetValueReturnCode_e ReturnCode = TecUtilStyleSetLowLevelX(ArgList);

TecUtilArgListDealloc(&ArgList);

Note that I haven't compiled/tested this code. If you stare long/hard enough at the documentation for TecUtilStyleSetLowLevelX and the macro command that is produced, you should be able to deduce the necessary parameters to the ArgList.

regina
Experienced user
Posts: 18
Joined: Mon May 14, 2007 1:15 am
Location: france
Contact:

Re: Axis mode control by AddOn

Postby regina » Wed Jun 06, 2007 10:20 pm

Ok, this works! so all style settings can be done using this ... I will try it out the next time I need it.

Thanks

Regina


Return to “Add-on Developer's Kit (ADK)”

Who is online

Users browsing this forum: No registered users and 1 guest

cron