Is it possible to retrieve autocad attributes of an existing block in a known repertory without open it as a drawing, change the attributes(tag,value, prompt, etc...), update the block, save it in a new repertory
You have two options; you can open the drawing in the current autocad session which is usually the fastest choice
and disable autocad updating the interface. So it looks like it just stopped for a moment. Then after you get your values, reactivate the autocad window. Or you can open up another copy of autocad and get the information from that copy. Altho this takes a lot more time. But you could do this upon loading autocad and just store the variables as a global variable; ready to be used.
Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
function GetValues ()
LockWindowUpdate (ThisDrawing.hwnd)
' do some secret stuff
' Open a drawing get the attribute value and then close the drawing.
LockWindowUpdate (0)
end function
' or
Sub OpenNewAcad()
Dim Acad As AcadApplication
Dim AcadDwg As AcadDocument
Set Acad = CreateObject("AutoCAD.Application")
Set AcadDwg = Acad.Application.Documents.Open("c:\filename.dwg")
' do stuff
' get values
Acad.Documents.Close
Acad.Quit
Set Acad = Nothing
End Sub