VishalMistry
18th July 2016, 16:45
Hi all,

I have to copy a tfgld1510s000 (sub-session) and make it main session. I also need to remove the filter criteria for this session.

as this is a standard session, no source code is available. to make changes, i added a script in my vrc (tfgld1510) and also added |#parent under declaration section.

anybody can guide me how and where i can add my own code under before.program section ?
below is a code snippet of before.program section:

before.program:
| This must be executed first; it loads the parent object
| dll so it's routines can be called.
| "find_parent_obj" is an exported function that is in
| the tccomqcidll1 library.
if (find_parent_obj("otfgld1510", "otfgld1510", _pobj_path) < 0) then
message("Unable to find parent object dll!")
end()
endif

_pobj_dll_id = load_dll(_pobj_path,0)
if (_pobj_dll_id <= 0) then
message("Unable to load parent object dll!")
end()
endif
_pobj_exe1("before.program")

what i need to do is remove the filter applied in standard script.

Request to guide me in this regard.

Vishal

Joy Conner
18th July 2016, 20:08
did you add qkey library to session?

mark_h
18th July 2016, 20:12
Actually you wanted to you could strip the code back down to nothing but a |#parent. Then just add the before.program and the code you want. Then compile it and see what happens. Or this is a sample from one of mine. You could add more code below in 2 spots before or after the original call to before program. If you want to suppress the call to the original codes before.program then try the |#inhibit command. Never tried that with before.program, but it works on form field events.

before.program:
| You could put code here.
|#pobj added by QKEY 3.70
| This must be executed first; it loads the parent object
| dll so it's routines can be called.
| "find_parent_obj" is an exported function that is in
| the tccomqcidll1 library.
if (find_parent_obj("otisfc0101", "otisfc0101", _pobj_path) < 0) then
message("Unable to find parent object dll!")
end()
endif

_pobj_dll_id = load_dll(_pobj_path,0)
if (_pobj_dll_id <= 0) then
message("Unable to load parent object dll!")
end()
endif
|#end add by QKEY
|#call
|#pobj added by QKEY 3.70
_pobj_exe1("before.program")
|#end add by QKEY
doing.update = false
| You could put other code here.

VishalMistry
19th July 2016, 10:47
Hi,

I think we don't need to as the library is added by QKey itself as we are using version 3.72.

Vishal

VishalMistry
19th July 2016, 13:44
Hello Mark,

It's been almost 6 months I touched QKey. After following your advice, my issue is resolved now.

Many thanks.

Vishal