How do I batch the existing scripting in WithClass from VBA?
You can actually run WithClass’s internal scripting at the class level using the VBA Macro property RunClassScript. You just need to pass the class object, the name of the script and the extension you wish to tagonto the final file output name. For example RunClassScript(CurrentClass.Name,”vcfunc0.sct”, “.cpp”) would generate foo.cpp using The vcfunc0.sct scriptif the CurrentClass.Name is foo. Below is an example that cycles through all classes using the vcfunc0.sct script: Dim ClassList As With_Class.Classes Dim CurrentClass As With_Class.Class; Dim iCount As Integer Dim j As Integer Dim strScriptDir As String strScriptDir = “c:\program files\wc98\scripts\” Set ClassList = wcDocument.Classes iCount = ClassList.Count For j = 1 to iCount Set CurrentClass = ClassList.Item(j) wcDocument.RunClassScript(CurrentClass.Name, strScriptDir + “vcfunc0.sct”,”*.
Related Questions
- How do I batch the existing scripting in Transport Architect from VBA?
- How do I batch the existing scripting in Transport Architect from VBA?
- Why "scripting", why not access AutoCAD through Active-X or VBA?
- Why "scripting", why not access AutoCAD through Active-X or VBA?
- How do I batch the existing scripting in WithClass from VBA?
- Why can I run existing icemcfd script in batch mode?