Showing posts with label Datacap. Show all posts
Showing posts with label Datacap. Show all posts

Tuesday, December 26, 2017

Datacap360 Channel gets 10,000 view

I started this Datacap Youtube channel at the end of 2016 and after more initial views than I expected I set a goal in July to have 10,000 views by the end of the year. The channel surpassed 10,000 views just before Christmas. Thanks to everyone for watching. I'm working on more Datacap videos and probably going to start a how to program (games focus) channel this year. https://www.youtube.com/c/Datacap360 The goal now is 100k views by the end of 2018. Merry Christmas everyone. Thanks, Wood

Friday, June 5, 2015

Datacap C# Smart Parameter parsing using MetaWord

I keep having to look up how to get a smart parameter in Datacap using both C# and VBScript. Figure it's time to leave myself a breadcrumb.

Here is the sample in C#, it comes directly from the vScanSample where I always look for it.
        public bool myact_set_folder(string sPath)      // set the folder to search for files
        {
            dcSmart.SmartNav localSmartObj = null;
            try
            {
                localSmartObj = new dcSmart.SmartNav(this);
                //If the parameter is a smart parameter, look up the actual path (returns the original path if it was not a smart parameter)
                mFolderPath = localSmartObj.MetaWord(sPath);
                RRLog.Write("Image source folder set to: " + mFolderPath);
            }
            catch (Exception ex)
            {
                RRLog.Write("myact_set_folder error: " + ex.ToString()); 
                return false;
            }
            finally
            {
                localSmartObj = null;
            }

            return true;
        }


Here is the VBScript Datacap custom action version to parse the smart parameter. This comes directly from one of my own custom actions I use for doing text searching.

   'Get the smart parameter for the FinderString
    sTmp = MetaWord(FinderString)
    If (sTmp = "") Then 'Field Value
        Set oChild = CurrentObj.FindChild(Right((FinderString), Len((FinderString))-1))
        If Not(oChild Is Nothing) Then
           WriteLog("Hostname from field")
           sTmp = oChild.Text
    Set oChild = Nothing
        End If
    End If
    ValueToSearch = sTmp
    WriteLog("ValueToSearch = " & ValueToSearch)

Hope I remember that I left myself this note here

Tuesday, May 27, 2014

Datacap Documentation

I know this blog has been all about game development for many years, but my day job at IBM has been to create applications with Datacap so I'm going to add some Datacap posts.

It took a while to get used to Datacap and I highly recommend getting some training as the learning curve will go a lot faster.  Here are the best places to find Datacap documentation.

First, don't think this is clever.  Simply do a google search for Datacap Documentation.

The publication library is the first stop.
http://www-01.ibm.com/support/docview.wss?uid=swg27035774
Scroll down to the PDF documentation.  The best place to start for building Datacap applications is the Application Development using IBM Datacap Taskmaster.  I still spend a lot of time in that document.

The second place is the official infocenter documentation.
http://pic.dhe.ibm.com/infocenter/datacap/v8r1m0/index.jsp

The third place is the Proof Of Technology.  There is a lab book that goes with the Proof Of Technology the sales teams use.  This has great walk-throughs of the various tasks and can be very helpful to see how to do different tasks.

The fourth place is Developer Works.  There are great samples on many Datacap capabilities.
http://www.ibm.com/developerworks/data/library/techarticle/dm-ind-datacap-taskmaster/