Here's one way:
If temp.RightHandSide.Contains("//") Then 'expression contains comment Dim expComment As String = "" expComment = temp.RightHandSide.Substring(temp.RightHandSide.IndexOf("//") + 2) lw.WriteLine("comment: " & expComment) End If
Where "temp" is the expression object and "lw" is the listing window object.
I tried to solve one query.
Query : Link Desired NX expressions to WinForm
Background : (These below things are already done before Playing Journal)
1) I have an Assembly with 10 Expressions (Example)
2) Among 10 expressions , I am interested in only 5 expressions.
3) I add comment "Interested" to those 5 expressions by going to Tools->Expressions-> (Expression I'm Interested in) -> Edit Comment -> (Enter the Comment : "Interested")
So I can just get those 5 expressions only in which I am interested. (I dont want to prefere going with Comments - you can suggest any other simple/easy logic to derive REQUIRED expressions among bunch of expressions)
What I want to do :
1) User Play the Journal
2) Journal launches WinForm
3) Journal will go to the all expressions in Tools->Expressions->Comment
5) It will derive only those expressions in which Comment field : Interested is written.
6) Now WinForm shows the Name and Values of those 5 expressions I am interested in, in TextBoxes
5) User selects his required Expressions, Edit the Name/Value in TextBoxes. Hits OKAY
6) Assembly is updated.
This is a conceptual sequence I thought and u can suggest easy steps , loops,logic etc to simplify as I don't know much about programming.
If I can get full example code for above sequences for NX 10, It will be very useful to me.