Finding DMP Components
In most cases, when you want to communicate with a DMP component in the same solution, you will either know the name of the component or you know there will only be a single component of that type, and you can pass those details directly to dmpinitcomp. But sometimes you may need to use more complex logic for finding the component; for these cases, getdmpcomponents can be used to return a list of all the components in the DMP solution, and you can iterate through them. For example, if you want to initialize an "Xpress Executor" component with a name that ends with "Simulation":
declarations comps: list of dmpcomponent mycomp: dmpresource end-declarations comps := getdmpcomponents forall (c in comps) do if endswith(c.type,"Xpress Executor") and endswith(c.name,"Simulation") then dmpinitcomp(mycomp,c) if mycomp.status<>DMP_OK then writeln('Failed to find component due to error:', mycomp.lasterror) exit(1) end-if break end-if end-do
© 2001-2021 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.