Message 1 of 20
xref display order

Not applicable
10-13-2005
03:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want an xref to display behind the current drawing. I have tried the
sortents example but get an "invalid input" error on the last line
Dim xRef As String 'as built xref
Dim oBlockDef as acadBlock
xRef = Left(ThisDrawing.Name, Len(ThisDrawing.Name) - 6) & "ASP"
Set oBlockDef = ThisDrawing.Blocks.Item(xRef)
Dim eDictionary As Object
Set eDictionary = ThisDrawing.ModelSpace.GetExtensionDictionary
On Error Resume Next
Dim sentityObj As Object
Set sentityObj = eDictionary.GetObject("ACAD_SORTENTS")
On Error GoTo 0
If sentityObj Is Nothing Then
Set sentityObj = eDictionary.AddObject("ACAD_SORTENTS",
"AcDbSortentsTable")
End If
Dim ObjIds(0) As Long
ObjIds(0) = oBlockDef.ObjectID
Dim varObject As AcadObject
Set varObject = ThisDrawing.ObjectIdToObject(ObjIds(0))
Dim arr(0) As AcadObject
Set arr(0) = varObject
sentityObj.MoveToBottom arr
Anyone had success with this before or know why it's failin?
--
Dave Preston
Technical Dev. Engineer
C A Design Services Limited
Address: Design Centre, Hewett Rd, Gapton Hall,
GREAT YARMOUTH,
Norfolk 31 0NN,
Tel: 01493 440444,
Fax: 01493 442480,
E-Mail: dpreston@cadesignservices.co.uk,
Web Site: www.cadesignservices.co.uk,
Registered in England No. 1595687
This e-mail and any attached files is confidential and intended for the
addressee(s) only. It may contain privileged and confidential information,
and may not be disclosed to anyone else. Unauthorised recipients are
requested to preserve this confidentiality by deleting the original and to
advise the sender immediately of any mistakes in transmission. Internet
communications are not secure and therefore C A Design Services Limited does
not accept any legal responsibility for the contents of this message, and
the message and files are opened at the risk of the recipient. Unless
otherwise specifically stated any views or opinions are solely those of the
author and do not represent those of C A De
sortents example but get an "invalid input" error on the last line
Dim xRef As String 'as built xref
Dim oBlockDef as acadBlock
xRef = Left(ThisDrawing.Name, Len(ThisDrawing.Name) - 6) & "ASP"
Set oBlockDef = ThisDrawing.Blocks.Item(xRef)
Dim eDictionary As Object
Set eDictionary = ThisDrawing.ModelSpace.GetExtensionDictionary
On Error Resume Next
Dim sentityObj As Object
Set sentityObj = eDictionary.GetObject("ACAD_SORTENTS")
On Error GoTo 0
If sentityObj Is Nothing Then
Set sentityObj = eDictionary.AddObject("ACAD_SORTENTS",
"AcDbSortentsTable")
End If
Dim ObjIds(0) As Long
ObjIds(0) = oBlockDef.ObjectID
Dim varObject As AcadObject
Set varObject = ThisDrawing.ObjectIdToObject(ObjIds(0))
Dim arr(0) As AcadObject
Set arr(0) = varObject
sentityObj.MoveToBottom arr
Anyone had success with this before or know why it's failin?
--
Dave Preston
Technical Dev. Engineer
C A Design Services Limited
Address: Design Centre, Hewett Rd, Gapton Hall,
GREAT YARMOUTH,
Norfolk 31 0NN,
Tel: 01493 440444,
Fax: 01493 442480,
E-Mail: dpreston@cadesignservices.co.uk,
Web Site: www.cadesignservices.co.uk,
Registered in England No. 1595687
This e-mail and any attached files is confidential and intended for the
addressee(s) only. It may contain privileged and confidential information,
and may not be disclosed to anyone else. Unauthorised recipients are
requested to preserve this confidentiality by deleting the original and to
advise the sender immediately of any mistakes in transmission. Internet
communications are not secure and therefore C A Design Services Limited does
not accept any legal responsibility for the contents of this message, and
the message and files are opened at the risk of the recipient. Unless
otherwise specifically stated any views or opinions are solely those of the
author and do not represent those of C A De