Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to retrieve the value from ListView in Catia (WinAPI) or how to get a list of parts in V4

Status
Not open for further replies.

HWNDLE

Aerospace
Oct 1, 2013
2
US
Hi, guys! I need to get whole list of details in V4 assembly. Only one way I found to do this is through "Workspaces browser" window. I am trying to get a list of details in this widow via WinApi. So i found a handle of this element ("SysListView32"), but can't retrieve any value from it by SendMessage command... Look at my code below. It works with other elements(edit component for example by WM_GETTEXT), but SysListView32 seemed specific... Help me please, or maybe advise another way to get a list of V4 dits. Thank you

Code:
Sub CATMain()
CATIA.StartCommand ("Change Workspace")
Dim hwMainWindow As Long
Do While (hwMainWindow = 0)
    CATIA.RefreshDisplay = True
    hwMainWindow = FindWindow(vbNullString, "Workspaces Browser")
Loop

hSubWindow = FindWindowEx(hMainWindow, 0&, vbNullString, "WspBwerFrame")
hSubWindow = FindWindowEx(hSubWindow, 0&, "SysListView32", vbNullString)
Dim Value As String


A = SendMessage(hwSubWindow, LVM_GETITEMCOUNT, 0&, 0&) 'returns 0 every time :(
'B = SendMessage(hSubWindow, LVM_GETCOLUMN, 1, buffer) 'not work as the same

MsgBox (A)

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top