PDA

View Full Version : Block insertions



wpeacock
2005-01-17, 06:40 AM
Hi

I'm using this chunk of code to insert two blocks.
The first chunk works well and inserts the correct part.
the next section of code is supposed to insert another item but instead inserts the first item however the insertion points are that of the required second item.

Any Ideas as to what is going wrong....

[code]
'add soleboard
'Dim Soleboard As AcadBlock
Dim SB103975 As AcadExternalReference
Dim SB103975Pnt(0 To 2) As Double
Dim SB103975PathName As String
SB103975Pnt(0) = -112.5
SB103975Pnt(1) = 0
SB103975Pnt(2) = 0

SB103975PathName = "C:Program FilesACAD2000KwikScafComponents103975xyz.dwg"

' Add the external reference to the block
Set SB103975 = ThisDrawing.ModelSpace. _
AttachExternalReference(SB103975PathName, "XREF_IMAGE", _
SB103975Pnt, 1, 1, 1, 0, False)


'add BaseJack
'Dim BaseJack As AcadBlock
Dim J102622 As AcadExternalReference
Dim J102622Pnt(0 To 2) As Double
Dim J102622PathName As String
J102622Pnt(0) = 0
J102622Pnt(1) = 0
J102622Pnt(2) = 38

J102622PathName = "C:Program FilesACAD2000KwikScafComponents102622xyz.dwg"

' Add the external reference to the block
Set J102622 = ThisDrawing.ModelSpace. _
AttachExternalReference(J102622PathName, "XREF_IMAGE", _
J102622Pnt, 1, 1, 1, 0, False)

[code]

jwanstaett
2005-01-17, 03:05 PM
XREF_IMAGE is the name of the AcadExternalReference it can not be the same for both AcadExternalReference it the same as a block name

wpeacock
2005-01-17, 11:34 PM
Thanks heaps, it works a treat!

regards

Wayne