could any one can help me with below error in VBA?
code:
Sub ShowTransientElementsold() Dim tec1 As TransientElementContainer Dim ele1 As Element Dim flags As MsdTransientFlags Dim eleEnum As ElementEnumerator Set eleEnum = ActiveModelReference.GraphicalElementCache.Scan Set tec1 = CreateTransientElementContainer1(Nothing, flags, msdView1 + msdView4, msdDrawingModeHilite) Do While eleEnum.MoveNext Set ele1 = eleEnum.Current tec1.AppendCopyOfElement ele1 Loop End Sub
error image :
i'm using V8i select series 2
regards,
vinoth
Unknown said:In "About microstation" dialogue box, it is indicating select series 2 version 08.11.07.443
If MicroStation V8.5 was installed or re-installed, for whatever reason, after MicroStation V8i then the VBA libraries, which are Windows COM DLLs, will be recorded in the Windows Registry. It's the MicroStation GUID that is important: the GUID is the same for all editions, so it's the most recent installation that gets Windows' attention.
MicroStation is a Windows application, so when it asks Windows for the VBA DLLs that correspond to its GUID then it gets whatever Windows thinks is the current DLL.
Regards, Jon Summers LA Solutions
Thanks Jon.
In "About microstation" dialogue box, it is indicating select series 2 version 08.11.07.443.
as you suggested, let me reinstall, then i will update you.
Vinoth Joseph
ATKINS
Bangalore, India
Unknown said:TransientElementContainer not displaying in object browser
Here's what you should be seeing — the Bentley MicroStation DGN 8.9 Object library.
I don't know what Bentley vbprct0 type library is, but it is not VBA.
As others have indicated, you're using the V8.5 version of VBA with MicroStation SS2. At some point someone must have installed the earlier version of MicroStation after SS2. The solution is to reinstall SS2, which will add the necessary data to the Windows Registry.
TranslientElementContainer class was introduced in MicroStation 08.09.02
You may want to implement VBA class as follows:
I think you are not working in Select Series. In your references, 'Bentley Microstation DGN 8.0 Object Library' is for V8.05*
For select series, it should 8.9 Object Library.
Sivag
i missed to attach few of the screen shorts to describe clearly.
TransientElementContainer not displaying in object browser:
references addequipmentattribute image:
and "TransientElementContainert" is missing in declaration list:
Vinoth
Robert, thanks for the information that you passed.
i feel, i done correctly what you suggested. but, still the issue is there.
and, my appologize on partial information of function cleardisplay. please ignore that function. issue is with TransientElementContainer.
thanks stefan. i checked there in references. nothing is 'missing' and i don't know anything specially i need to add for this code.
Thanks Jon for the comments. i had written other vba applications and there was no problem while compiling. i have doubt , i'm missing any of the references. because while typing "Dim tec1 as ", the TransientElementContainer is not listing for selection. this code i prepared with inormation through net search. Also, in objectbrowser i searched for "TransientElementContainer" , but 'no items found'.
Below your hilighted Error, you have declared a Function ClearDisplay that appears not to return a Value data type that all functions are required to. If you have no data to return, consider declaring ClearDisplay as a Sub(routine) that by definition does not return any values.
I would highly recommend the following options be used for debugging all your VBA projects to help identify real problems that VBA is nicely hiding to protect the more casual programmer.
Recommended settings to configure in a development VBA debugging environment
HTH,Bob