Author Topic: filed string  (Read 1548 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
filed string
« on: July 10, 2017, 02:46:31 PM »
Hi all,..

i'm trying to know why this string do not work as field.

Code: [Select]
(setq AttText (strcat "%<\\AcObjProp Object(%<\\_ObjId 506077156672>%).TextString \\f \"%tc1\">%"))
this string work great if I cut&paste to any text without double backslashes..
it capture de valur of an block attribute.

any idea ?
« Last Edit: July 10, 2017, 03:06:30 PM by Andrea »
Keep smile...

ChrisCarlson

  • Guest
Re: filed string
« Reply #1 on: July 10, 2017, 03:14:34 PM »
I believe you need to pass the ObjectId differently.

Code - Auto/Visual Lisp: [Select]
  1. (itoa (vla-get-ObjectId (vlax-ename->vla-object (car attrib))))
  2.  

Andrea

  • Water Moccasin
  • Posts: 2372
Re: filed string
« Reply #2 on: July 10, 2017, 03:20:36 PM »
ok,...found it...

Code: [Select]
(vla-regen (vla-get-activedocument (vlax-get-acad-object)) acActiveViewport)

ppfftt  :)  Thank you.
Keep smile...

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: filed string
« Reply #3 on: July 10, 2017, 06:33:56 PM »
You can also use the UPDATEFIELD command (quicker than REGEN for large drawings) - this is typically required when populating an attribute with a field expression.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: filed string
« Reply #4 on: July 11, 2017, 10:00:51 AM »
You can also use the UPDATEFIELD command (quicker than REGEN for large drawings) - this is typically required when populating an attribute with a field expression.

Thanks Lee
 :uglystupid2:
Keep smile...