Make photography with Navision

foronavisionforonavision Member Posts: 79
Hello!

I need to make photographies from Navision. I have thought to use a webcam but I don't know how to use it from Navision.
Can anybody help me?

Thank you very much!!

Comments

  • SavatageSavatage Member Posts: 7,142
    can you explain more of what you are trying to accomplish
  • Alex_ChowAlex_Chow Member Posts: 5,063
    I think he wants to have video stream in Navision. I don't think it's possible, however, you can have Navision run another program to launch a video streaming program.
  • foronavisionforonavision Member Posts: 79
    I´m making a database in navision that requieres a photography a part form the rest of the data. I want to make this photography from the formulary that I use in Navision for introduce this information.
  • SavatageSavatage Member Posts: 7,142
    Sorry I guess it's a translation problem. But I don't get it :-k
  • jversusjjversusj Member Posts: 489
    i think he is saying he wants to include an image of an item in Navision. If it is a static image, he could easily load the image into a blob field. if he wants video (like a camera watching an assembly line), i have no idea...
    I´m making a database in navision that requieres a photography a part form the rest of the data. I want to make this photography from the formulary that I use in Navision for introduce this information.
    kind of fell into this...
  • zeninolegzeninoleg Member Posts: 236
    I have seen sometimes at the doctor's they fill in a new application and after they take a picture with the camera. Anyway you will have to do that through different application and then load file into Navision. If you know methods of that application you can control it from Navision. But I think that user will always want an ability to resize, and change image before putting it into the database...
    Best Regards,
    Oleg
  • jhoekjhoek Member Posts: 216
    edited 2006-11-06
    Most webcams (cameras, scanners, ...) can be controlled through an API called WIA - Windows Image Acquisition. There's an Automation interface that can be used from C/SIDE as well. It can be downloaded from http://www.microsoft.com/downloads/deta ... layLang=en. Good luck!
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • David_CoxDavid_Cox Member Posts: 509
    Do you mean you want to link a photograph to a record in navision.

    Store the path to the Photo, and open the photo when you select it?
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
  • jhoekjhoek Member Posts: 216
    Here's a little code sample:
    Globals:
    - DeviceManager	Automation	'Microsoft Windows Image Acquisition Library v2.0'.DeviceManager	
    - DeviceInfo	Automation	'Microsoft Windows Image Acquisition Library v2.0'.DeviceInfo	
    - Device	Automation	'Microsoft Windows Image Acquisition Library v2.0'.Device	
    - Item	Automation	'Microsoft Windows Image Acquisition Library v2.0'.Item	
    - ImageFile	Automation	'Microsoft Windows Image Acquisition Library v2.0'.ImageFile	
    - Index	Integer		
    
    OnRun()
    // Create the WIA device manager
    CREATE(DeviceManager);
    
    // Return the device info for the first WIA-compatible device;
    Index := 1;
    DeviceInfo := DeviceManager.DeviceInfos.Item(Index);
    
    // Connect to the first device
    Device := DeviceInfo.Connect;
    
    // Take picture
    Item := Device.ExecuteCommand(wiaCommandTakePicture);
    
    // Store the image file
    ImageFile := Item.Transfer;
    ImageFile.SaveFile('c:\temp\test.bmp');
    
    procedure wiaCommandTakePicture() : Text[50]
    EXIT('{AF933CAC-ACAD-11D2-A093-00C04F72DC3C}');
    
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • smshydsmshyd Member Posts: 72
    Hi jhoek,
    Tried above but getting following error
    This message is for C/AL programmers:

    The call to member Item failed. Unknown Class returned the following message:
    Index out of range.

    at below line
    DeviceInfo := DeviceManager.DeviceInfos.Item(Index);
    index is 1
    will it work only in XP or windows 7 also.?
    Any thing changes needed fro window 7?

    Thanks in advance
  • jhoekjhoek Member Posts: 216
    Hi!

    If index 1 is out of range, it seems the DeviceManager.DeviceInfos collection is empty. I'm not really an expert in this field, but I think this might indicate that the device driver for your camera/scanner/... is not WIA-compatible.

    As far as I could see on MSDN and Wikepedia, Windows Image Acquisition is still the recommended Windows API for image acquisition, so there's a fair chance that a WIA-compatible device driver is available on your device's manufacturer's website.

    Good luck!
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
Sign In or Register to comment.