Error adding object to symbol table.

Error adding object to symbol table.

Anonymous
Not applicable
327 Views
2 Replies
Message 1 of 3

Error adding object to symbol table.

Anonymous
Not applicable
the following line of code produces the following error:
"Error adding object to symbol table."


vector(1) = returnPnt(1) + ThisDrawing.ActiveUCS.YVector(1)

It doesn't produce this error immediately, only after the following cope has
been run a number of times.

full code:
*************
Public Sub construction_line_VER_sub()
'Author: Tom Burton
'Date: 11/6/00
'Procedure Purpose: create vertical construction line

'Revs:
'RevId Date Author
' Description


'On Error GoTo errorcheck
Dim a, CONSTRUCTIOnEXISTS As Integer

Dim returnPnt As Variant
Dim xlineObj As AcadXline
Dim vector(0 To 2) As Double
' Return a point using a prompt
returnPnt = ThisDrawing.Utility.GetPoint(, "Enter a point: ")
If IsEmpty(returnPnt) Then GoTo ender
returnPnt(2) = 0
vector(1) = returnPnt(1) + 1
vector(0) = returnPnt(0)
vector(2) = 0


vector(1) = returnPnt(1) + ThisDrawing.ActiveUCS.YVector(1)
vector(0) = returnPnt(0) + ThisDrawing.ActiveUCS.YVector(0)


For a = 0 To ThisDrawing.Layers.Count - 1
If ThisDrawing.Layers(a).Name = "CONSTRUCTION" Then
CONSTRUCTIOnEXISTS = True
End If
Next

If CONSTRUCTIOnEXISTS <> True Then
ThisDrawing.Layers.Add ("CONSTRUCTION")
ThisDrawing.Layers("CONSTRUCTION").COLOR = 11
End If

If ThisDrawing.ActiveLayout.Name = "Model" Then
Set xlineObj = ThisDrawing.ModelSpace.AddXline(returnPnt, vector)
Else
Set xlineObj = ThisDrawing.PaperSpace.AddXline(returnPnt, vector)
End If
If ConLine_Color = 0 Then
ConLine_Color = 101
Else
ConLine_Color = ConLine_Color + 5
End If
If ConLine_Color >= 200 Then ConLine_Color = 100

xlineObj.COLOR = ConLine_Color
xlineObj.Layer = "CONSTRUCTION"

ender:
Exit Sub
errorcheck:
If Err <> -2147352567 Then
MsgBox (Error(Err))
Else
Resume Next
End If



End Sub


*******************
0 Likes
328 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Some of the drawing file will cause an error "Error adding object to symbol
table" when the following line is executed.

TransMatrix = ThisDrawing.ActiveUCS.GetUCSMatrix()

The drawing file has no problem at all. Can someone please tell me how to
fix this kinds of error or get the ucs matrix without hitting on this error?

Sunny
0 Likes
Message 3 of 3

Anonymous
Not applicable
Some of the drawing file will cause an error "Error adding object to symbol
table" when the following line is executed.

TransMatrix = ThisDrawing.ActiveUCS.GetUCSMatrix()

The drawing file has no problem at all. Can someone please tell me how to
fix this kinds of error or get the ucs matrix without hitting on this error?

Sunny
0 Likes