×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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 --> VBA

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 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources