client.RunThroughVisualScript
Forums
HI Brian
your site is great!
could you please help me with what this property does:
client.RunThroughVisualScript
Hi Kumar and welcome to the
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
Hi,
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
Hi Yinon,
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