Jump to content

How to I get the cases in an Event Structure


MikaelH

Recommended Posts

I reproduced this behavior. It seems that you use ClearType font smoothing. So there are gray levels in the image. Just modify the code in such way:

post-7450-0-58048200-1291635921_thumb.pn

You can change font smoothing setting in Windows with Screen properties->Apperance tab -> Effects button -> Smoothing method->Standard (sorry, controls names may not be exact, because I translated them from localized system version).

BTW - it seems that Get Image method does not exist in 8.2 for anything but diagrams. If you want to make the code general, you should use Get Image of Block Diagram instead and trim it with Master Rectangle of structure

Combined with GOCR gives me the following, thanks. I'll make it general for 8.2 later.

post-7534-0-22912200-1291640535_thumb.pn

EDIT: This snippet requires that you have gocr049.exe in the same folder as the VI (it's in the zip file, along with a 2010 version of the VI).

Event Structure OCR.zip

  • Like 1
Link to comment

Here's my latest. It doesn't use GOCR any more (I used Mikael's brute-force approach with a different implementation) and it works in LV 8.2.

post-7534-0-56547600-1292267660_thumb.pn

I'm thinking this will be how I add Event Structures to my Case Select RCF plugin. :)

<EDIT> There's a demo.vi in the attached zip file that contains an Event Structure and the code to extract the events </EDIT>

Event Structure OCR.zip

  • Like 1
Link to comment

This is how I'm handling anomalies in my OCR:

post-7534-0-14231000-1292327809_thumb.pn

It searches the text for things like spaces before/after periods and the number 1, repeated single quotes (indistinguishable from double-quotes) and repeated spaces (they're everywhere); I'll add more as I find them. I've updated the file in my previous post.

Link to comment

Not related question: Why all snippets you post have header indicating 8.2 version regardless of version you actually created them in?

I use the Code Capture Tool instead of the native feature. The CCT lets me save my snippets in older versions of LabVIEW.

Link to comment

I use the Code Capture Tool instead of the native feature. The CCT lets me save my snippets in older versions of LabVIEW.

:lightbulb:

Of course I knew that. Small boolean constants and blue scripting headers confused me.

Thanks for the effort on behalf of all people tied to older (but still good and usable) LV versions.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.