Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
gfx010
Posts: 2
Registered: ‎05-17-2009
0

How to Copy and Paste Source Code From Xilinx ISE to Microsoft Word with the keyword colors ?

Is there any way to copy the source code from Xilinx ISe and paste it Microsoft Word and KEEPING the colors as they are???

Because whenever I paste it to MS Word the colors are lost...

 

Any help would be appreciated.. 

 

Thanks... 

Contributor
kcathcar
Posts: 42
Registered: ‎01-06-2009
0

Re: How to Copy and Paste Source Code From Xilinx ISE to Microsoft Word with the keyword colors ?

[ Edited ]

To the best of my abilty to detimine, as of ISE 10.1.3 there is no way to do that.

 

However, I've written a macro that can re-colorize the source code just like ISE does. (It currently only works for (System)Verilog code).

 

The results of the macro will hopefully match ISE's coloring exactly. However, the macro is not based on ISE's code, so there could be differences.

If you notice any please let me know.

 

The macro is easy to use. Just paste the source code into word,and set up the font and fontsize you desire.

Then select the verilog code and run the macro.

 

But before you can use the macro you must install it.That is also pretty easy:

  1. Download the attched zip file.
  2. Open text file inside using notepad.
  3. Selectall the text and copy it
  4. Open Microsoft Word.
  5. Hold Alt and press the  F8 key. (This will open the macro window.)
  6. In the text box type "VerilogColor".
  7. Press the Create button.
  8. A new window appears.
  9. Select all the lines from "Sub VerilogColor()" to "End Sub" (about 10 lines).
  10. Paste the text you copied.
  11. Choose "Select All" from notepad's edit menu.

If you are not familar with running macros the easiest way to run the macro is to open the Macro window with Alt+F8, find the macro in the list and press the run button.

 

Message Edited by kcathcar on 05-20-2009 02:19 PM
Message Edited by kcathcar on 06-06-2009 04:09 PM
Regular Contributor
benradu
Posts: 52
Registered: ‎08-16-2007
0

Re: How to Copy and Paste Source Code From Xilinx ISE to Microsoft Word with the keyword colors ?

You can use Notepad++ or PSPad.

In NP++ you can find this under Plugins->Npp Export.

 You may want to customize the colors as you like before exporting.