In KWE or KWA rules, it is possible to create objects such as points, planes, lines, etc. on the fly. I have been trying to create a VB Script on the fly within a rule in this way and was wondering if anyone else has ever tried this?
There are two types available in the KWA rule language browser: "VBScript" and "kweVBScript". VBScript has three attributes: "ScriptText", "EntryPoint" and "Arguments". I have been able to use these attributes to populate/modify a "Macros with objects" (VBScript) on the tree, but have not been able to use it to generate a VBScript on the fly. When I go to use the ->Run function, it fails.
I think the problem is, there is no function to create the VBScript object, so the attributes in the language browser can only be used to modify something that has already been created. Conversely when dealing with a point, line, etc. there are functions that actually create an object.
My reason for doing this is I am trying to execute a script in a KWE advanced check without having the user click the "corrective action" icon; I want it to happen automatically. I also want my solution to be contained in one file, so no references to external scripts are needed.
At this point, I’m just fishing for clues so any input would be appreciated. I have included a screenshot of the language browser with the two types described above. |