64 bit reports wrong MemberType

64 bit reports wrong MemberType

Anonymous
Not applicable
272 Views
5 Replies
Message 1 of 6

64 bit reports wrong MemberType

Anonymous
Not applicable
If I run the code below on a 64 bit machine with Public Subs in Default.ivb,
the msgbox never displays and all Subs are actually returned as being
Functions. If I run it on my 32 bit machine then it reports the subs as
subs.

Is this known, or am I doing something wrong, and if not is there a
workaround?
Inventor 2009


Public Sub FindMacros()

Dim oVBA As InventorVBAProjects
Dim oVBProject As InventorVBAProject
Dim oVBComponent As InventorVBAComponent
Dim oVBAMember As InventorVBAMember

Dim m_IVApp As Inventor.Application
Set m_IVApp = ThisApplication

Set oVBA = m_IVApp.VBAProjects
For Each oVBProject In oVBA
For Each oVBComponent In oVBProject.InventorVBAComponents
For Each oVBAMember In oVBComponent.InventorVBAMembers
If oVBAMember.MemberType = MemberTypeEnum.kSubMember
Then
MsgBox oVBAMember.Name
End If
Next
Next
Next


End Sub

--
KWiKMcad
Kent Keller
0 Likes
273 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Anyone? Am I the only one seeing this?

--
KWiKMcad
Kent Keller
"Kent" wrote in message
news:6183032@discussion.autodesk.com...
If I run the code below on a 64 bit machine with Public Subs in Default.ivb,
the msgbox never displays and all Subs are actually returned as being
Functions. If I run it on my 32 bit machine then it reports the subs as
subs.

Is this known, or am I doing something wrong, and if not is there a
workaround?
Inventor 2009


Public Sub FindMacros()

Dim oVBA As InventorVBAProjects
Dim oVBProject As InventorVBAProject
Dim oVBComponent As InventorVBAComponent
Dim oVBAMember As InventorVBAMember

Dim m_IVApp As Inventor.Application
Set m_IVApp = ThisApplication

Set oVBA = m_IVApp.VBAProjects
For Each oVBProject In oVBA
For Each oVBComponent In oVBProject.InventorVBAComponents
For Each oVBAMember In oVBComponent.InventorVBAMembers
If oVBAMember.MemberType = MemberTypeEnum.kSubMember
Then
MsgBox oVBAMember.Name
End If
Next
Next
Next


End Sub

--
KWiKMcad
Kent Keller
0 Likes
Message 3 of 6

Anonymous
Not applicable
W are able to reproduce this issue. A high priority change request has been
filed. I'm afraid I don't know of any workarounds.

Thanks for reporting this.

Sanjay-
0 Likes
Message 4 of 6

Anonymous
Not applicable
Thanks Sanjay. As always your help is appreciated. It helps knowing I am
not just overlooking something.

--
KWiKMcad
Kent Keller
"Sanjay Ramaswamy (Autodesk)" wrote in
message news:6184078@discussion.autodesk.com...
W are able to reproduce this issue. A high priority change request has been
filed. I'm afraid I don't know of any workarounds.

Thanks for reporting this.

Sanjay-
0 Likes
Message 5 of 6

Anonymous
Not applicable
I don't see where this is listed in the SP1 readme. Did it not get
addressed?

--
KWiKMcad
Kent Keller

"Kent" wrote in message
news:6183032@discussion.autodesk.com...
If I run the code below on a 64 bit machine with Public Subs in Default.ivb,
the msgbox never displays and all Subs are actually returned as being
Functions. If I run it on my 32 bit machine then it reports the subs as
subs.

Is this known, or am I doing something wrong, and if not is there a
workaround?
Inventor 2009


Public Sub FindMacros()

Dim oVBA As InventorVBAProjects
Dim oVBProject As InventorVBAProject
Dim oVBComponent As InventorVBAComponent
Dim oVBAMember As InventorVBAMember

Dim m_IVApp As Inventor.Application
Set m_IVApp = ThisApplication

Set oVBA = m_IVApp.VBAProjects
For Each oVBProject In oVBA
For Each oVBComponent In oVBProject.InventorVBAComponents
For Each oVBAMember In oVBComponent.InventorVBAMembers
If oVBAMember.MemberType = MemberTypeEnum.kSubMember
Then
MsgBox oVBAMember.Name
End If
Next
Next
Next


End Sub

--
KWiKMcad
Kent Keller
0 Likes
Message 6 of 6

Anonymous
Not applicable
Kent,

This issue did in fact get addressed in SP1, but for some reason didn't make
it into the readme. The member types are now correctly reported, with one
exception. Events are identified as subs. Microsoft has identified this as a
technical limitation of VBA.

Thanks again for reporting this issue.

Sanjay-
0 Likes