LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Set application file name in source code

Hello,

 

in some projects i use the same software, only with different interfaces, or sometimes with customized panels. Within the sourcecode i just activate or deactivate the functions i need with defines, f.e: #define USE_TCP...and  #ifdef USE_TCP...........#endif. 

 

 

Is it possible to set the application name in source code (instead of BUILD -> TARGET SETTINGS) ?.

 

I'm lookink for something like 

 

#idfef UART_TARGET........project_uart.exe

#elif defined TCP_TARGET........project_tcp.exe

#else ............... project_standard.exe

#endif

 

in other compilers (for microcontrollers) i can do something like this with #EXPORT (HEX, FILE=HEX_FILENAME)

 

Any ideas?

 

Thanks and greetings from Bremerhaven, Germany

 

Norbert Rieper

0 Kudos
Message 1 of 4
(2,975 Views)

Hi ,

 

I don't know if it's possible but you can save file names / directory as a simple char fileName[256] ,

 

You can make a simple code that scan a designated directory and choose the file you need....

 

Still maybe one of the CVI Developer's will give you the best answer , base on my C knowledge i don't it's possible....

 

 

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 2 of 4
(2,940 Views)

Hi Kobi Kalif,

 

thanks for trying helping me.

 

I'm not looking for source code to find a particualar file at runtime. I'm looking for a compiler command within my source code to generate a exe-file with a predefined name. 

 

Norbert Rieper

0 Kudos
Message 3 of 4
(2,917 Views)

Ohh....

 

Well there is the :

 

CVI_AppBuildProject (CAObjHandle objectHandle, ERRORINFO *errorInfo, long *returnValue);

 

But it's only for build with no names support , that's what I know but maybe there is something else which I don't know of.....

 

One more thing - At the menu Build > Builed Steps 

 

there you can define your options at 3 stages :

 

  • Custom Build Actions—Actions that occur immediately before LabWindows/CVI starts dependency checking after you initiate a build.
  • Pre-build Actions—Actions that occur after LabWindows/CVI checks for dependencies and before it builds the target. Pre-build actions occur only when the target needs to be built.
  • Post-build Actions—Actions that occur after the target is built. Post-build actions occur only when a build is successful. 
Try over there maybe it will help you....
-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 4 of 4
(2,914 Views)