PeterPan9720 Posted June 5, 2010 Posted June 5, 2010 Hy Guy, pls somebody could help me to find a solution to my issue ? I found the below code, Sub Getblockinsertpnt() Dim Block As AcadBlockReference Dim ReturnObj As AcadObject Dim ReturnPnt As Variant GetEnt: 'Start loop point ThisDrawing.Utility.GetEntity ReturnObj, ReturnPnt, "Select a block: " If ReturnObj.ObjectName "AcDbBlockReference" Then MsgBox "The selected object wasn't a block!", vbExclamation GoTo GetEnt 'Goto loop point End If Set Block = ReturnObj 'Return the blocks insertion point MsgBox "X: " & Block.insertionpoint(0) & " ; Y:" & Block.insertionpoint(1) & " ; Z:" & Block.insertionpoint(2) End Sub the code working fine if I select "manually" the block on the drawing I get the coordinates on the msg box. Is there a way to substitute with an object selection set in all the dwg and then match the coordinates with Item("X") ? thnks. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.