TheSwamp
Code Red => VB(A) => Topic started by: cadpro on November 07, 2006, 06:30:35 AM
-
Hi all,
Is it possible to retrieve the attribute values from an xref using objectDBX?
Thanks
-
Yes
-
Could you please help me out on how to do this?
Thanks
-
There is no selectionset available so you must cycle through model or paperspace.
So are you trying to get every att from every blockref or ??.
Let's narrow it down a bit.
-
Thanks for the reply Bryco.
I search every layout specifically, as each layout contains some blockreferences that has a few attributes. What I intend to do is, I write these attributes into Excel, one row for one layout. And so far, everything works. But one of the attributes are in an xref which cannot be retrieved like all other attributes. So I would like to know how this can be done.
Thanks
-
This is my code:
For intLayout = objDBX.Layouts.Count - 1 To 0 Step -1
If objDBX.Layouts(intLayout).ModelType = False Then
For Each objEnt In objDBX.Layouts(intLayout).Block
If TypeOf objEnt Is AcadExternalReference Then
For Each Entity In objDBX.Layouts(intLayout).Block(objEnt.Name)
If Entity.HasAttributes Then
'do operation here
End If
Next Entity
End If
Next objEnt
End If
Next intLayout
Thanks
-
Could you please help me out on how to do this?
I don't feel inclined to do so
-
Since .XRefDatabase doesn't work with dbx you are best off opening up the xref with another instance of dbx and getting what you need
-
Thanks Bryco. That worked. But it takes a while to execute the code. Is there some kind of code that executes faster?
Thanks
-
Thanks Bryco. That worked. But it takes a while to execute the code. Is there some kind of code that executes faster?
Thanks
what worked. .. faster than what ??