Message 1 of 3

Not applicable
12-26-2015
06:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everybody,
I have problem with insertion of external reference to each layouts.
Below is the some part of my code and a sub function EXREFEKLE in which i want to add an external reference to each layout.
In the code i can obtain EBATK amount of layouts but my external reference is exisiting only at the first layout.
Best regards
....
Call EXREFEKLE(ka1K, olc2K, EBATK)
.....
Public Sub EXREFEKLE(ka1K, olc2K, EBATK)
ThisDrawing.ActiveSpace = acPaperSpace
Dim xrefInsertedK As AcadExternalReference
Dim LayoutsK As AcadLayouts
Dim bnoK(0 To 2) As Double
ThisDrawing.ActiveSpace = acPaperSpace
Dim xrefInsertedK As AcadExternalReference
Dim LayoutsK As AcadLayouts
Dim bnoK(0 To 2) As Double
Dim STRPATH1K As String
Dim STRPATH2K As String
Dim STRNAME1K As String
Dim STRNAME2K As String
Dim STRPATH2K As String
Dim STRNAME1K As String
Dim STRNAME2K As String
bnoK(0) = 0
bnoK(1) = 0
bnoK(1) = 0
STRPATH1K = "D:\MYFOLDER\" & ka1K
STRNAME1K = "TEST"
STRNAME1K = "TEST"
With ThisDrawing.Utility
For j = 1 To PaftaSay
ThisDrawing.Layouts.Add EBATK & j
Next j
Set LayoutsK = ThisDrawing.Layouts
LayoutsK("Layout1").Delete ' ok
LayoutsK("Layout2").Delete ' ok
End With
For j = 1 To PaftaSay
ThisDrawing.Layouts.Add EBATK & j
Next j
Set LayoutsK = ThisDrawing.Layouts
LayoutsK("Layout1").Delete ' ok
LayoutsK("Layout2").Delete ' ok
End With
Set xrefInsertedK = ThisDrawing.PaperSpace.AttachExternalReference(STRPATH1K, STRNAME1K, bnoK, olc2K, olc2K, olc2K, 0, False)
End Sub
Solved! Go to Solution.