I have this .dwg file that has hundreds of block references. I am trying to create hyperlink to a pdf file from all of the block references. The pdf are on my D drive.
For example, names of the block refernece are: '2:test', '26:test', '234:test'
. Essentially hyperlink for
each point would be: '2:test' would hyperlink to D:\Reports\File-002.pdf
;
'26:test' would hyperlink to D:\Reports\File-026.pdf
; '234:test' would hyperlink to D:\Reports\File-234.pdf
.
From block references i get the number before the ':', and its matching pdf would be 'File-' followed by the number before ':' in 3 digits. There are lot of these to do by hands, and i think i can program for this.
I have enough basic programming knowledge to manipulate the string to get my number and convert it in 3 digits. The question i have and/or need help is with how to cycle through each block reference(for loop) on the file and be able to write to its hyperlink property? Is this even possible?
Before coming here i kind of looked at these links but they did not prove helpful: Link1; Link2; Link3
Thanks for the hints
UPDATE
Private Sub CommandButton1_Click()
Dim ReadData As String
Open "C:\Desktop\Files\DesignFile.DWG" For Input As #1
Do Until EOF(1)
Line Input #1, ReadData
MsgBox ReadData 'Adding Line to read the whole line, not only first 128 positions
Loop
Close #1
End Sub