From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to split source file without loosing tags

Solved!
Go to solution

Hello,

 

I am wondering how I could split my source file into two (or more) without loosing the tags...

0 Kudos
Message 1 of 5
(4,893 Views)

Hello Wolfgang!

 

By 'tags', are you referring to source code documentation tags (e.g. HIFN, HIPAR, HIRET, ARRAY, OUT)?

0 Kudos
Message 2 of 5
(4,881 Views)

Hello Jay,

 

sorry for being sloppy: I am referring to the tags you set or reset using Shift+F2...

 

When preparing a new release I mark the functions I've thoroughly tested and thus consider ready with these tags. Obviously I do not want to loose this information when splitting a long file in order to cut down compilation times (thanks CVI2013...). Since this tag information is saved in the cws file and deleted if you remove a source file in the workspace (you can't rename it...) I did not find a way...

0 Kudos
Message 3 of 5
(4,877 Views)
Solution
Accepted by topic author Wolfgang

Hello again, Wolfgang!

 

OK, now I understand! However, I'm afraid there's no import mechanism in CVI, so that you could move the tags over to another file, other than doing this operation manually.

 

It would be however possible to perform a workaround. Since you already have this information in your CWS file (Line Tags field), you could manually copy-paste the line numbers over to the new file containing the source code you splitted from the old file. Some steps:

  1. Let a.c be your source code file containing source tags.
  2. Perform a copy of a.c (e.g. b.c), and add b.c to the project.
  3. In your CWS file, copy-paste the Line Tags field of a.c over to the corresponding entry of b.c.
  4. Go back to CVI, making sure that both the source code and the source tags from b.c are a perfect clone of a.c.
  5. Perform required changes to a.c and b.c, such that the final result is the splitted logic of the initial file. As you change lines from a source file, the source tags are also shifted in the source editor.
  6. The final result is the splitted code between a.c and b.c, while keeping the corresponding position of the source tags.

I'm aware that there's some work involved in performing these operations, but the outcome should be your expected result.

I hope this helps, Wolfgang!

Message 4 of 5
(4,869 Views)

Thank you, it works this way! Smiley Happy

0 Kudos
Message 5 of 5
(4,854 Views)