Microstation SE and Visual Basic 6.0

Status
Not open for further replies.
Joined
Dec 3, 2001
Messages
6
Reaction score
0
When I want to get the link of element, I use the function elem.extractDBLinkages with array of type MBEDatabaselink.

****** In Microstation Basic, I do :

Dim lnk as MBEDatabaseLink
Dim elem as New MBEelement
..

If elem.foundDBLinkage = MBE_SUCCESS then
if elem.extractDBLinkages(lnk) = MBE_SUCCESS then
...
...
end if
end if

******In VisualBasic 6.0

Dim lnk as Object
dim elem as Objetc

set elem = msApp.MbeElement
set lnk = msApp.MbeDatabaseLink 'occurs error "Can't assign to array"

If elem.foundDBLinkage = msapp.MBE_SUCCESS then
if elem.extractDBLinkages(lnk) = msapp.MBE_SUCCESS then ... ... end if end if

Can Somebody help me?

Thanks
 
Luiz ...

******In VisualBasic 6.0

Dim lnk as Object
set elem = msApp.MbeElement
set lnk = msApp.MbeDatabaseLink 'occurs error "Can't assign to array"

When MicroStation SE was released it was compatible with VB version 5. When Microsoft release VB version 6, they changed something internally related to array allocation, which broke the ability to use arrays with MicroStation Basic.

The solution, if you want to stick with MicroStation SE, is to use VB version 5.

The good news is that MicroStation v8 has excellent support for Visual Basic since it includes VBA.
 
"Luiz Fernando De Oliveira Silva" schrieb im
Newsbeitrag

When I want to get the link of element, I use the function elem.extractDBLinkages with array of type MBEDatabaselink.

****** In Microstation Basic, I do :

Dim lnk as MBEDatabaseLink
Dim elem as New MBEelement
..

If elem.foundDBLinkage = MBE_SUCCESS then
if elem.extractDBLinkages(lnk) = MBE_SUCCESS then
...
...

Hallo Luiz!

You can use the following Code in VB6:

Dim lnk As Object
Dim i as integer
Dim j as integer

j = max number of possible links

ReDim lnk(j)
For i = 0 To j
Set lnk(i) = Micro.MbeDatabaseLink
Next i

If you do not know the maximal number of links, well then I do not have any solution. Has someone any Idea?
 
Status
Not open for further replies.

Latest threads

Back
Top