Message 1 of 3
Error adding object to symbol table.

Not applicable
05-22-2001
05:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
*******************
"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
*******************