Message 1 of 3
How can i get the last object and create a field based on his contents?

Not applicable
11-17-2017
09:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm creating some texts with autolisp and after that trying to create a text field to reference the contents of these texts, but i'm doing it wrong. Can someone help me if it's easy for you?
Here i'm sending my dwg with these text fields alright.
(Command "Text" p1 "0.20" "0" "N.1" "") (setq e1 (ssget "L")) ;; This example creates a text object in model space. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Define the text object (setq insertionPoint (vlax-3d-point pm) textString (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-ObjectID (vlax-ename->vla-object e1))) ">%).TextString>%" ) height 0.10) ;; Create the text object in model space (setq modelSpace (vla-get-ModelSpace doc)) (setq textObj (vla-AddText modelSpace textString insertionPoint height)) (vla-ZoomAll acadObj)