キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Comment code

Is there a way to put a comment box around a piece of code. e.i. if I
modify a small portion of a vi and want the next programmer to see exactly
where I made my changes I can add a comment but, I would like to surround
the entire change. Any ideas.

Thanks,
mickey
メッセージ1/12
27,807件の閲覧回数
You can enter your comments directly on the diagram window by clicking on the 'whitespace' of the diagram with the 'edit text' cursor selected and then input your comments. Afterwards, you can resize the comment box by dragging a corner of it with the 'position/size/select' cursor selected, shade it with the 'set color' cursor and relegate it to the background by using the 'reorder' tools on the menu bar.
0 件の賞賛
メッセージ2/12
27,807件の閲覧回数
Sorry, I spoke to soon. That doesn't work as the comment box does not move behind the data flow lines and continues to obscure them. Excuse me.
0 件の賞賛
メッセージ3/12
27,807件の閲覧回数
Spaz wrote in news:5065000000050000008C6E0000-
1017707437000@exchange.ni.com:

> Sorry, I spoke to soon. That doesn't work as the comment box does not
> move behind the data flow lines and continues to obscure them. Excuse
> me.

If you set the bacgkground of the comment box transparent it works,
(remember to set the foreground color to black or another color or the
frame will disappear) but then again, it's not possible to make a fancy
background color.
0 件の賞賛
メッセージ9/12
27,807件の閲覧回数
Yes you can see the wires but you can't select them to move or edit them. They are still *under* the comment box.


LabVIEW, C'est LabVIEW

0 件の賞賛
メッセージ10/12
27,807件の閲覧回数
Jean-Pierre Drolet wrote in news:506500000005000000A86E0000-
1017707437000@exchange.ni.com:

> Yes you can see the wires but you can't select them to move or edit
> them. They are still *under* the comment box.

You are correct:

A comment box with transparent background will show wires but it is not
possible to select them.

but:
I get the same behaviour when using decorations copied from the front panel

(Labview 6.0.2)

Regards
Rolf
0 件の賞賛
メッセージ11/12
27,554件の閲覧回数
You are right. Then we can only use frame decoration to enclose code and keeping the wire edition functional. I wonder why wires are forcedd to be below any other object on the diagram.


LabVIEW, C'est LabVIEW

0 件の賞賛
メッセージ12/12
27,554件の閲覧回数
The only problem that prevents this technique to be really useful is that the comment box hides the wires beneath it even when put in background.

Another option is to copy a box (made transparent)or a frame from the front panel decoration menu and resize it to enclose your code snippets.


LabVIEW, C'est LabVIEW

0 件の賞賛
メッセージ4/12
27,807件の閲覧回数
Jean-Pierre-

You are brilliant (as always). I never new you could put front panel decorations on the diagram. Many times I have wished for an arrow decoration on the diagram. If your front panel is smaller than your diagram page you can actually drop the decoration straight onto the diagram once you have picked it from the front panel controls toolbox. Do you think this is 'issue free' as far as app builder, version recompiling or VI server functionality?

It seems that the old style frame decoration would be his best choice as it would give the thickest border that is colorable.

It seems that another posssibility that would allow for a colored background without obscuring the wires is to use a sequence structure without adding any additio
nal frames. I'm not sure if this would be issue free in terms of performance and all possibilities of diagram wiring.

Thanks for your input.
0 件の賞賛
メッセージ5/12
27,807件の閲覧回数
*blush*

Spaz,

I am not aware of any issue when copying pictures and decorations on the diagram. For the application builder, VIs diagrams are removed so any picture within vanishes in the virtual void.

The sequence works too but it is very thick. You must state that the structure is solely for comment purposes because it is usually used for coding. Otherwise, sequences have no performance issues: they force execution order on the compiler but the code execute at the same speed.


LabVIEW, C'est LabVIEW

0 件の賞賛
メッセージ6/12
27,807件の閲覧回数