How do I programmatically remove comments within an expression ?

I would like to evaluate into a LabVIEW substep a TS expression. This expression may contain comment(s).
The TestStand Str() function allow to do that with the "%expr" format.
I tried to do something equivalent with the GetFormattedValue method, but the "%expr" format is not allowed.
Is there any way to do it without adding a pre-expression in my substep ?
Jean-Louis SCHRICKE
├ CTA - Certified TestStand Architect (2008 & 2010 & 2014)
├ CTD - Certified TestStand Developer (2004 & 2007)
└ CLD - Certified LabVIEW Developer (2003 & 2005)

There is the following API method that will help you:
PropertyObject.EvaluateEx ( exprString, evaluationOptions).
You would use this most likely on the SequenceContext. It will return a new property object with the evaluated value. For example, if exprString is "\"this is a test\" //comment here", it will be evaluated to the string "this is a test". Likewise, if you had a local variable Locals.stringVar which had a value of "abc", you could pass the expression "Locals.stringVar //comment here", and it would evaluate to "abc". It will return it in a property value (which you can call GetValNumber or GetValString, etc...), and you can then take that value and do what you please.
It sounds like you want something to evaluate to a number, then format it with a format string in LabVIEW. You can evaluate the expression to a PropertyObject that is a number type, get the value of the number, then use the Format String VI in LabVIEW.
If you are trying to do something else or I didn't answer your question, let me know.
Allen P.
NI

Similar Messages

  • How do I programmatically remove a Windows system font with LabVIEW?

    Is there a way to programmatically remove a Windows System Font?
    Thanks!

    If you know the font name, you should be able to just use the Delete function. On NT, Win2K, the fonts are stored in the WINNT\Fonts folder. I think you'll have to have admin rights to delete files there.

  • How can I programmatically remove a selection of plots from a waveform graph?

    I have a waveform graph to display a number of plots, which I need to programmatically add and delete to as selections of data are chosen by the user for display.
    I've looked under the VI Server Property node and cannot see anything suitable for adding extra plots, or removing existing plots. I expected to see a Plot Data array variable, with each element containing the data for each of the plots on the graph. There is such an array for the annotations, which I can easily edit by Removing Subset for Array, or Insert into Array, but nothing for the plot data. The Value property is a Variant, which I'm unsure how to handle. Should I be working with this perhaps? Can this be done by creating a Local Variable read node? Or am I missing something simple here??
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

    Hi Mike,
    I was trying to use the Property Node (Value) to read the waveform graph, but I was getting a Variant type back, not a 2D array of DBLs as I expected. Turns out I was passing the graph control reference to a subvi whose control refnum had the Include Type flag unchecked. As a result of this explicit definition, Value was of an uncertain (undefined) type and couldn't be natively provided. It would have had to have been cast into a more specific type to work. Have solved the problem by ensuring all my references are of a strict type, and now (as you recommend) the Property Node (Value) is useful
    Many thanks for the response!
    And many thanks for the demo too! You put that together remarkably quickly!
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • How do I report / remove comments?

    I've had my comments removed but I don't see how to remove other people's comments that are irrelevant to the question I post.

    You can't. Only the Hosts (Moderators) can remove posts, and they do this when a post has breached the Terms of Use - for example by ranting rather than asking a question, trying to discuss or speculate about Apple's future policy, or plain rudeness. When a post is removed for this reason the perpetrator is advised by email.
    However your may have had posts removed because they were a response to a post which has been removed, and so would have no function - you wouldn't be notified in that case.
    Decisions on what to remove are entirely up to the Hosts, though posters at Level 2 and above can draw the Hosts' attention to anything which seems dubious.
    If you have a serious reason for wanting a post removed - personal abuse, for example - then post the details here and someone will probably alert the Hosts to it. However simple irrelevance isn't likely to get a post removed.

  • How to unlock and remove comments in Adobe Reader X for WIN 7?

    A while ago I left a comment in an adobe file and now I want to change it or remove it. The problem is that I can't do anything to the comment, because it is locked and it seems that I don't have the permission to do that. I run Win 7, 64bit.
    When I select properties on the comment by right clicking on it in the Comment List on the right in the Properies window the Locked checkbox is empty, gray and unselectable. The fact that the Locked checkbox is empty should mean that the comment is not locked but there is an icon next to it that pictures a small lock. I am confused. Is it locked? Is it not? Is there anything I can do to remove or change this comment?
    Next to the Locked checkbox is a Make Properties Default checkbox which is selectable but I believe unrelated to what I want to do. What do I do?

    I do not know what causes this; I do not have any such problem on a very similar system.  But if I did have such a problem, I would
    make sure the latest Adobe Reader version is installed
    make sure all Windows updates are installed
    check if there is a newer printer driver version available
    see if temporarily disable AV would prevent the problem
    Sorry, no other ideas.

  • How to unlock and remove comments in Adobe Reader?

    A while ago I left a comment in an adobe file and now I want to change it or remove it. The problem is that I can't do anything to the comment, because it is locked and it seems that I don't have the permission to do that. I run Win 7, 64bit.
    When I select properties on the comment by right clicking on it in the Comment List on the right in the Properies window the Locked checkbox is empty, gray and unselectable. The fact that the Locked checkbox is empty should mean that the comment is not locked but there is an icon next to it that pictures a small lock. I am confused. Is it locked? Is it not? Is there anything I can do to remove or change this comment?
    Next to the Locked checkbox is a Make Properties Default checkbox which is selectable but I believe unrelated to what I want to do. What do I do?

    Remove or delete?
    To delete, first try holding down the option (alt or ⌥) key while emptying.

  • How do I programmatically remove a subVI from another VI's block diagram?

    If it helps, I have a special do-nothing VI called "Bookmark.vi" that I use to mark related code when I have to hop around between two or more places repeatedly.

    You would need to use the super secret, super "can completely mess up my program", method of LabVIEW VI Scripting. You can find more information over at the Lava User Groups.
    Of course, if the VI doesn't do anything, why not just leave it in and not bother with it?

  • How can i remove comments from the "tell your frie...

    How can I remove comments from the "tell your friends how you're doing" section?

    Please do a Skype reset.
    Exit Skype : From the system tray >> right click on the skype icon and click "Quit"
    Press WinKey+R
    Type: %appdata% and press Enter.
    Rename the folder "Skype" to "Old_Skype"
    Run Skype.
    You will need your password to re-log on, and re-set any options from default
    Regards,
    Tamim
    Location - Dhaka | Bangladesh - Standard Time Zone: GMT/UTC + 06:00 hour
    If one of my replies has adequately addressed your issue, please click on the “Accept as Solution” button. If you found a post useful then please "Give Kudos" at the bottom of my post, so that this information can benefit others.

  • In LiveCycle Designer ES4 how do you remove tabs within a page once they have been created?

    In LiveCycle Designer ES4 how do you remove tabs within a page once they have been created?

    Emma,
    Take a look at the troubleshooting tips on this page from the Infosemantics website:
    http://www.infosemantics.com.au/adobe-captivate-widgets/drag-and-drop/troubleshooting-widg et-issues
    Pay particular attention to the section entitled: "My drag and drop question works correctly sometimes, but not other times. "
    From the appearance of your slide, it looks like you may have removed some of the components from the quiz slide that are necessary for it to function correctly.  Try the test that this section of the troubleshooting suggests so that you can see if this is the case.  If it turns out that you have deleted some items, you'll need to recreate your quiz slide to get them back again.
    Hope this helps.

  • How to remove comments in packages in oracle

    hi gurus,
    can any body help me to remove commented code in packages in oracle?
    thanks in advance...

    The obvious suggestion would be to edit the package (or package body) in whatever editor you prefer and recompile. I'm assuming you know that, however, since you managed to create the package in the first place. If that's not what you're looking for, can you explain a bit more what you're asking?
    Justin

  • How to eliminate or remove zeros from 1D array

    How to eliminate or remove zeros from 1D array. Let say I have 1D array having foolowing elements
    "0 0 0 0 0 4 0 0 9 0 0 1 4 0 0 0 0 0 0 0 0 10 9 0 0"
    So after removing or eliminating zeros it will become as follow
    "4 9 1 4 10 9"
    So can any body guide me how can I do that? See attached Image for details.
    Thanks 
    JK

    altenbach a écrit :
    hchiam wrote:
    Here are 2 example .vi's I made based on altenbach's removeZeroes.png in this discussion thread: 
    It seems pretty pointless to post those because no new useful information is given.
    Currently, only the input is defined in the connector pane, making them useless as subVIs.
    unlike my example using integers, an "=0", like any "equal" comparison, is potentially dangerous with DBLs.
    Reshaping a 2D array to 1D before removing zeroes is pretty pointless because a 2D output cannot be recovered. A more interesting scenario would be to remove some columns or rows (e.g. that are all zeroes) from a 2D array.
    You should also clean up the front panel, e.g. properly zero the upper left corner, make the controls/indicators nicely labeled, sized and arranged, and maybe even add scrollbars to the arrays.
    Thank you for those comments.
    Now the input and output are defined (in the updated attachments) for use as example subVI's.  I also cleaned up a few visual details, but I leave the rest for others to cater to their specific uses if they don't want to use this as a subVI (or at least as-is), such as changing the icons or changing to integers instead of doubles.
    I'm not sure about what you mean exactly with "=0" being "potentially dangerous with DBLs".  I'm guessing you had a certain case scenario in mind.  Although the subVI's seem to work fine within my larger program and situation, my situation may not generalize with regards to this point.
    I reshaped from 2D to 1D, with a 1D output, because it could be helpful for things like when later processing just needs a 1D array.  For example, in my situation I had to remove a huge spike of unnecessary "0"'s from a previous subVI that were affecting the output display of a certain histogram.  So it turned out a 1D array output was helpful, and you never know what problems come up, so I included the 2nd example.
    Hopefully if someone is looking for this, they can just use or play with an example subVI (granted that they know how to plug things in for their context).  I was hoping to post a subVI people could put to direct use.

  • How do you force itunes comments to ID3 tags in MP3 files?

    I have comments all throughout itunes. The mp3 files do not have those comments in the ID3 info.
    How do you force itunes comments to write out to ID3 tags in MP3 files?
    The folder and files all have write permission.

    Yeah, don't do that, you probably also degrade the sound quality... If you've confirmed it is something odd with multiple tags try this.
    Select a group of mp3 files (You might want to start with a smart playlist so you don't mess with any other format)
    Right-click and use Convert ID3 Tags > None (may need to repeat this step if multiple tags)
    Then right-click and use Convert ID3 Tags > v2.3 (v2.4 support still patchy from various accounts)
    Downside is that it will lose any embedded artwork, but it should preserve all other meta-data, both tag-based and stored within the library itself.
    In fact, if you use my CreateFolderArt script before and after updating the tags it should archive any artwork as a local Folder.jpg image for each album and then reinsert that image on the subsequent run... Check it out on a single album first. If it doesn't work as expected let me know and I'll tweak the script to achieve this end.
    tt2

  • I brought in a slideshow but photos didn't include comments.  How can I get my comments imported along with the pictures?

    I brought in a slideshow but photos didn't include comments.  How do I get my comments?

    First make sure you've added the comments you want to show in the Add a Description field in iPhoto or in the Title field.  If you put them in the Title field and you envoke the feature in iDVD you won't have to delete the title from each slide to give you just the desciption.  Or batch remove the Titles from all the photos before you add them to the iDVD project. You can allways get them back with the Photos ➙ Batfch Change menu option later on.
    Click on the cog wheel menu button at the bottom and select Show titles and comments checkbox.
    Happy Holidays

  • How to create a new folder within the video folder in media

    Hi, I'm trying to figure out how to create a new folder within the video folder in media. I can easily create new folders within the pictures folder but not in videos.....Why??? Thanks in advance for your help.
    Message Edited by dany_s on 06-25-2009 03:58 PM
    Solved!
    Go to Solution.

    Hello,
    I think you can try two things : the soft reboot, and if it does not work, the hard reboot. Don't worry, you can't lose data with these two reboots.
    Soft reboot :
    1) Hit the three following keys at the same time :
    - Alt
    - Right Shift
    - Delete
    2) wait 2 minutes for the Blackberry to wake up.
    Hard reboot :
    1) your Blackberry device is on
    2) remove the battery and wait for a minute
    3) Put the battery back
    4) wait 5 minutes for the device to wake up.
    Please tell us if it works for you.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • How to customizing single line comment

    Because of the restriction of our dsl language we cannot use SL_COMMENT terminal directly. We have own rule of "Comment" which is defined as a parser rule.
    // '..' is the identifier of our comment rule just like '//'
    Comment:
    '.' '.' (ID|INT|ANY_OTHER)*
    Now we have a problem:
    How can we insert/remove '..' with standard shortcut "Ctrl+/" ? Could we reimplement this feature anywhere in XText ?
    Has anybody any idea for it?

    Christian Dietrich wrote on Tue, 30 June 2015 12:32org.eclipse.xtext.ui.editor.toggleComments.ISingleLineCommentHelper.getDefaultPrefixes(ISourceViewer, String)
    Thanks for your useful hints. It helps me so much.
    But still a problem could not be solved. We have following grammar:
    // this is not comment
    ..!meta foo bar
    //following 2 line are comments
    ..!foo bar
    ..foo bar
    It means that every line which begins with '..' is a comment except that begins with '..!meta'.
    Now the problem is:
    When I type 'ctrl+/' at line '..!meta foo bar', it removes the prefix '..'. But I want to insert '..' before '..!meta'.
    How can I do it? Should I reimplement ToggleSLCommentAction? If yes, where is this Action called or injected?

Maybe you are looking for

  • Creating a PO with out hitting any Accounts

    Hi Gurus, We have a business scenario where they accept goods from different companies for free (like donations) and we have to accept them and take them into our inventory. One of our approach was to create a PO and then create a GR with reference t

  • ASSIGN_TYPE_CONFLICT dump error

    I am getting a short dump "ASSIGN_TYPE_CONFLICT" error whenever i execute a DTP to load data from PSA to 0MAT_PLANT. Please suggest what needs to be done

  • Same picture repeated while printing onto a network printer

    I have created a newsletter, and when I print it to my black and white printer (connected directly to my computer), then everything prints out just fine. When I try and print the same letter onto a color network printer, then the pictures get distort

  • Evaluating Calculated members in Sub Cube space

    Hello all, I have a question about evaluating calculated members against sub queries. For an example take a look into the following MDX query; with member [Product].[Category].[All Categories] as sum({[Product].[Category].&[1], [Product].[Category].&

  • IOS 5 / bluetooth and tethering

    Since my upgrade to IOS 5 the wireless functions have become unstable 1) When I use blue tooth with my car, the phone just disconnects after about 30 minutes, then the phone will crash about 30 minutes later 2) When I turn on wifi hotspot tethering m