Jump to content

Blocks insertion point.


PeterPan9720

Recommended Posts

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...