ThisDrawing.Utility.GetEntity FixBlock, PickPoint, "Please select a fixing.."
If Err 0 Then
Err.Clear
Exit Sub
Else 'Else for error..
If FixBlock.ObjectName = "AcDbBlockReference" Then 'If block..
If FixBlock.Name Like "A$C*" Then 'If the block name is "A$C......." (A copied and pasted block)..
MsgBox "This isn't a true fixing block - It appears to be a copied / pasted block.." & vbCr & "Please pick another instance of it", vbExclamation, "Fixings Chart Creator.."
GoTo PICK
Else
'ENTER ATTRIBUTE CODE HERE GETTING "FIXDESC" STRING..
End If
ElseIf FixBlock.ObjectName "AcDbBlockReference" Then 'If NOT block..
ThisDrawing.Utility.Prompt "You may only select a block: "
GoTo PICK
End If 'End If for objectname..
End If 'End if for error..
PICKED:
fx1descTXT.text = FixBlock.Name & ": " & FixBlock.Handle 'Put the block name in the text box..
Public Function GETFIXINGBLOCK(FixBlock As AcadObject, PickPoint As Variant)
On Error Resume Next
PICK:
ThisDrawing.Utility.GetEntity FixBlock, PickPoint, "Please select a fixing.."
If Err 0 Then
Err.Clear
Exit Function
Else 'Else for error..
If FixBlock.ObjectName = "AcDbBlockReference" Then 'If block..
If FixBlock.Name Like "A$C*" Then 'If the block name is "A$C......." (A copied and pasted block)..
MsgBox "This isn't a true fixing block - It appears to be a copied / pasted block.." & vbCr & "Please pick another instance of it", vbExclamation, "Fixings Chart Creator.."
GoTo PICK
Else
' Other code to go here later for getting the block attribute values but for now, just the block name..
GoTo PICKED
End If
ElseIf FixBlock.ObjectName "AcDbBlockReference" Then 'If NOT block..
ThisDrawing.Utility.Prompt "You may only select a block: "
ThisDrawing.Utility.GetEntity FixBlock, PickPoint, "Please select a fixing.."
If Err 0 Then
Err.Clear
Exit Sub
Else 'Else for error..
If FixBlock.ObjectName = "AcDbBlockReference" Then 'If block..
If FixBlock.Name Like "A$C*" Then 'If the block name is "A$C......." (A copied and pasted block)..
MsgBox "This isn't a true fixing block - It appears to be a copied / pasted block.." & vbCr & "Please pick another instance of it", vbExclamation, "Fixings Chart Creator.."
GoTo PICK
Else
'ENTER ATTRIBUTE CODE HERE GETTING "FIXDESC" STRING..
End If
ElseIf FixBlock.ObjectName "AcDbBlockReference" Then 'If NOT block..
ThisDrawing.Utility.Prompt "You may only select a block: "
GoTo PICK
End If 'End If for objectname..
End If 'End if for error..
PICKED:
TB.Text = FixBlock.Name & ": " & FixBlock.Handle 'Put the block name in the text box..