Skip to main content

client.RunThroughVisualScript

HI Brian
your site is great!
could you please help me with what this property does:
client.RunThroughVisualScript

Brian Element Sun, 02/19/2017 - 11:07

Hi Yinon,

Glad you are enjoying the site.  Just out of curiousity where did you find that command, it is something that I have never used before.  I see that it is a boolean but I have no idea how you would incorporate it into an IDEA script.  How are you trying to use it?

Brian

Brian Element Sun, 02/19/2017 - 20:36

In reply to by yinondotan

Yes, that is where I found it but it might be a command that is not accessible to IDEAScript but can only be used with IDEA.  If you go look there are quite a few of those as you can see the different DLLs that are available to IDEA but not all of them are open.

kumar Mon, 04/23/2018 - 07:39

Hi Brain,
Hope you doing good,
I just registered.
since this blog is related to Idea script, I am posting my question here, 
Q - can we convert .ISS files(IDEA macro scripts) into excel macros or VBscripts
 
Regards,
Kumar

Brian Element Mon, 04/23/2018 - 12:24

Hi Kumar and welcome to the site.

Yes you can, I did play with that awhile ago.  This was written using Visual Studio.  You need to access the IDEA Client object.  I know you can access it through Python which is now included in IDEA 10.3 and I have heard of people using C++ to access the IDEA object and run IDEA.  Hope this helps a bit to get you started.


Module Module1

    Sub Main()
        Dim oIDEA As Idea.IdeaClient
        Dim oDB As COMMONIDEACONTROLSLib.IdeaDatabase
        Dim oTable As COMMONIDEACONTROLSLib.ITableDef
        Dim oField As COMDBLib.Field
        Dim count As Integer
        Dim i As Integer
        Dim sFilename As String

        sFilename = InputBox("Please enter a filename in your project:")
        'MsgBox(sFilename)
        oIDEA = New Idea.IdeaClient
        oDB = oIDEA.OpenDatabase(sFilename)
        oTable = oDB.TableDef

        count = oTable.Count
        For i = 1 To count
            oField = oTable.GetFieldAt(i)
            MsgBox(oField.name)
        Next i

        oField = Nothing
        oTable = Nothing
        oDB = Nothing
        oIDEA = Nothing


    End Sub

End Module

DanHoep Thu, 09/13/2018 - 05:51

In reply to by Brian Element

Hi,
if I may add to this, you can also use LateBinding in Excel-VBA to use the IDEAClient and it's Methods. The following example opens an IDEA-Database, exports it into an Excel-Workbook and opens it afterwards:

Option Explicit

Sub test()
IDEADB_TO_XLSX "C:\DATA\IDEA\SampleFile.IMD", "C:\Data\MyIDEA_COM_Export.xlsx"
Workbooks.Open "C:\Data\MyIDEA_COM_Export.xlsx"
End Sub

Sub IDEADB_TO_XLSX(IDEAFile As String, ExcelFile As String)
Dim IDEAClient As Object
Dim db As Object
Dim tsk As Object
Set IDEAClient = CreateObject("IDEA.IDEACLIENT")
Set db = IDEAClient.OpenDatabase(IDEAFile)
With db.ExportDatabase
.IncludeAllFields
.PerformTask ExcelFile, "Worksheet", "XLSX", 1, db.Count, ""
End With
IDEAClient.CloseDatabase IDEAFile
IDEAClient.Quit
Set IDEAClient = Nothing
End Sub