Using OCX in a customization

I am completely lost. Does anyone have an example/documentation on using an OCX in a customization?

Epicor 9.05.603 SQL Non-Unicode but I will take anything from any version.

JPS

OCX? You refering to Object Linking? Active X type of stuff?
What is the end goal?

Jose,

We purchased a 2D material optimizer. We have been using it for years inside a Microsoft Access database. We pull the data from Epicor and create a file which has the inventory list, parts to cut list , and standard length purchase parts list. We send this file to the OCX as a parameter. The OCS returns the file appending an optimized cut list. I would like to move this into Epicor and not use the Access program. So far, I have epicor building the parameter file. I now need to send the file to the OCX to produce the cutting plan. I will be storing the cutting plan in the UD table UD100-UD100A.

We will eventually use the optimized list(UD100 tables) to do purchase suggestions, REQ’s and Auto-Transfer of material to jobs.

JPS

Jose,

A little more information. In the Access database we create a reference to the OCX, drag the OCX onto the form, then use this simplified code to send the file to the OCX:

Me!.CL1DEX4.DataFullFileName = “C:\Data.dat”
Me!CL1DEX4.LowLevelAPI = True
ME!CL1DEX4.Run
Do
Sleep(100)
Loop until Not Me!CL1DEX4.Running
Me!CL1DEX4.Close

Then we open the dat file and extract the cutting plan.

JPS

You’ll likely have to write a DLL that you can load into the client which in turn calls the OCX. I don’t think you can do it directly in a customization. But making a DLL should be pretty straight forward

Some fancy IDE’s have functions that will create wrapper DLLs for your OCX. I used to use that with Borland\Codegear so I assume VIsual has something similar

1 Like