Jump to content

Get info from insertblock


Cleyton Ramos
 Share

Recommended Posts

Hello!
How do I get the information from an insertblock by clicking it?
Thank you very much in advance.
Edited by Cleyton Ramos
Link to comment
Share on other sites

You need to explain more  what it is you want

 

Select object:
; IAcadBlockReference: AutoCAD Block Reference Interface
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 000000013fc9b0b8>
;   Document (RO) = #<VLA-OBJECT IAcadDocument 0000000072274788>
;   EffectiveName (RO) = "DA1DRTXT"
;   EntityTransparency = "ByLayer"
;   Handle (RO) = "D998"
;   HasAttributes (RO) = -1
;   HasExtensionDictionary (RO) = 0
;   Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 000000003cf4ae48>
;   InsertionPoint = (0.0 0.0 0.0)
;   InsUnits (RO) = "Unitless"
;   InsUnitsFactor (RO) = 1.0
;   IsDynamicBlock (RO) = 0
;   Layer = "DRGTEXT"
;   Linetype = "ByLayer"
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Material = "ByLayer"
;   Name = "DA1DRTXT"
;   Normal = (0.0 0.0 1.0)
;   ObjectID (RO) = 44
;   ObjectName (RO) = "AcDbBlockReference"
;   OwnerID (RO) = 45
;   PlotStyleName = "ByLayer"
;   Rotation = 0.0
;   TrueColor = #<VLA-OBJECT IAcadAcCmColor 000000003cf59ba0>
;   Visible = -1
;   XEffectiveScaleFactor = 1.0
;   XScaleFactor = 1.0
;   YEffectiveScaleFactor = 1.0
;   YScaleFactor = 1.0
;   ZEffectiveScaleFactor = 1.0
;   ZScaleFactor = 1.0

 

Link to comment
Share on other sites

Oh yes!
Thanks for listening.
I need to capture the description and the block quota through the insertion point of the block and send it inside a textbox.

 

 I have two textboxes. One for quota and another for description. I want to fill them with this data.
Edited by Cleyton Ramos
Link to comment
Share on other sites

Are you saying the opposite of this done in lisp

 


; This will record text picked and push it into a block with attributes
; By Alan H oct 2018

(defun pushtext ( / lst ent txt blk x att)
(setq blk (vlax-ename->vla-object (car (entsel "Pick block object"))))
(foreach att (vlax-invoke blk 'getattributes)
(setq txt (vla-get-textstring (vlax-ename->vla-object (car (entsel "Pick text object")))))
(vla-put-textstring att txt)
(princ "\n")
)
)
(pushtext)

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
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.

 Share

×
×
  • Create New...