LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way to print source code to a color printer with color syntax high liighting enabled ?

I printed my source code to our color printer and was suprised to find a BW print-out. I searched through all the printer options and found nothing to indicate that this possible. Any of you NI guys know ?
My code looks much uglier( not to mention less intelligible ) without the syntax hi-lighting; Help me out guys !
0 Kudos
Message 1 of 7
(4,142 Views)

Hi Din-o,

As of CVI 8.1, syntax coloring will print by default if you print to a color enabled printer. You can adjust the colors by navigating to Options >> Colors on the menu bar.

Unfortunately, in versions of CVI previous to 8.1, this was not built-in feature (that said, it was highly requested - showing the power of user suggestions).

Matt M
NI

0 Kudos
Message 2 of 7
(4,125 Views)
Hi Din-o.

If you don't have CVI 8.1, you can use a stand-alone text editor with color printing capability.

Two that I have used and can recommend are TextPad (free trial available) and Programmer's Notepad (freeware).

You can add an item to the CVI Tools menu (via Tools / Customize in v7.1) to start your editor; however, I don't believe there is a way to include the current file on the command line.

Regards,
Colin.

TextPad download
Programmer's Notepad download


0 Kudos
Message 3 of 7
(4,115 Views)
Colin,

Actually, you can pass the current file to a Tools menu program. Use the %FILE% tag as part of a command line argument, and CVI will replace this tag with the full name of the active window.

Luis
0 Kudos
Message 4 of 7
(4,102 Views)
Thanks, Luis.

Are these tags (%FILE%, etc.) documented anywhere in the CVI Help?

Regards,
Colin.

0 Kudos
Message 5 of 7
(4,099 Views)
Er... yes and no 🙂

The %FILE% tag was added in version 7.0, but it was only put into the documentation in version 8.0. So, in version 7.1 it works, but it's not documented.

In version 8.0 and later, it's documented in the Tools menu customization topic (the index entry is "Customize command, Tools menu").

By the way, %FILE% is the only tag that exists for the Tools menu.

Luis
0 Kudos
Message 6 of 7
(4,090 Views)
Thanks for all the input
0 Kudos
Message 7 of 7
(4,072 Views)