VBA causes entity to display

VBA causes entity to display

Anonymous
Not applicable
321 Views
4 Replies
Message 1 of 5

VBA causes entity to display

Anonymous
Not applicable
Using 2004 we have a file from out of the office that has AecDbCeilingGrid entities. All but one of these entities does not display and is resistant to any our our normal techniques. However, running many of our VBA routines results in the entity being visible on the next regen. In fact any simple VBA that generates an error requiring a VBA reset results in the entity displayed on the next regen. For example when running:

Sub test()
aaa
End Sub

the aaa generates an error. After resetting a regen shows the entity.

So what is going on here?

Thanks, AKS
0 Likes
322 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Experimenting a bit further into this mystery the following two proceedures are identical except that testA generates and handles its own division by 0 error. Sub testA will regen this file so that the entity is visible. All subsequent regens after testA show the entity. Sub testB does not show the entity.

Sub testA()
On Error Resume Next
a = 1 / 0
ThisDrawing.Regen acAllViewports
End Sub

Sub testB()
On Error Resume Next
a = 1 / 1
ThisDrawing.Regen acAllViewports
End Sub
0 Likes
Message 3 of 5

Anonymous
Not applicable
I apologize for hammering away at this. Apparently this entity will also be visible if _vbaide is run first (either by command or ALT F11) so that the message "Initializing VBA System ..." shows up in the command window. This leads to the question why there would be any difference between running a VBA without _vbaide, loading a VBA without _vbaide and then swtching to the VBA editor, and just first forcing _vbaide as the first command? In each case is not the VBA system running? Note that only when "Initializing VBA System ..." shows up in the command window does this entity show up. In other words the command _vbaide only results in "Initializing VBA System ..." when it is the first command executed.
0 Likes
Message 4 of 5

Anonymous
Not applicable
Some property data sets can use VBA in their properties. I wonder if that is
the case here?

What happens if you have the following statement in your Acad.rx file
(add/modify in your support folder):

AcVBA.arx

--
R. Robert Bell


wrote in message news:5207445@discussion.autodesk.com...
I apologize for hammering away at this. Apparently this entity will also be
visible if _vbaide is run first (either by command or ALT F11) so that the
message "Initializing VBA System ..." shows up in the command window. This
leads to the question why there would be any difference between running a
VBA without _vbaide, loading a VBA without _vbaide and then swtching to the
VBA editor, and just first forcing _vbaide as the first command? In each
case is not the VBA system running? Note that only when "Initializing VBA
System ..." shows up in the command window does this entity show up. In
other words the command _vbaide only results in "Initializing VBA System
..." when it is the first command executed.
0 Likes
Message 5 of 5

Anonymous
Not applicable
In our setup we cannot edit the acad.rx file. Apparently AcVBA.arx is not loaded at startup time. Under that condition the entity is not displayed. Manually loading the AcVBA.arx through appload does result in the entity showing up on the next regen.
0 Likes