reproduce eattedit behavior vba
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
reproduce eattedit behavior vba

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
Guest






Posted: Tue Aug 23, 2005 8:10 pm    Post subject: reproduce eattedit behavior vba Reply with quote

Hi,

when you double-click a block's attribute under autocad 2005 the
enhanced attribute editor window appears with the attribute you
double-clicked already selected. I want to produce a similar effect
for a vba project.

I already use a selection set to click my objects but if it's a block
with attributes I want to get that attributes value directly.

Anybody know how to do it ?

TIA!

here's my code so far :
UserForm1.hide
Set ssetObj = ThisDrawing.SelectionSets.Add("TitreManuel121")
ssetObj.SelectOnScreen
For i = 0 To ssetObj.Count - 1
Set entObj = ssetObj.Item(i)
objType = entObj.ObjectName
If objType = "AcDbText" Then
Set entTxt = ssetObj.Item(i)
txtRev.Text = entTxt.TextString
ElseIf objType = "AcDbMText" Then
Set entMTxt = ssetObj.Item(i)
txtRev.Text = entMTxt.TextString
ElseIf objType = "AcDbBlockReference" Then '<-- for blocks
Set entBR = ssetObj.Item(i)
varAttribs = entBR.GetAttributes '<-- currently I only loop
through atts
upAtt = UBound(varAttribs)
For ii = 0 To upAtt
testvar = varAttribs(ii).Handle
Next ii
End If
Next i
ssetObj.Delete
UserForm1.Show 1

Back to top
humberto



Joined: 26 Aug 2005
Posts: 6

Posted: Sat Aug 27, 2005 6:32 am    Post subject: re:reproduce eattedit behavior vba Reply with quote

try an acad events

Private Sub AcadDocument_BeginDoubleClick(ByVal PickPoint As Variant)

End Sub
Back to top
View user's profile Send private message
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB