Author Topic: How to create field with lisp?  (Read 2654 times)

0 Members and 1 Guest are viewing this topic.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
How to create field with lisp?
« on: November 15, 2007, 12:58:56 PM »
Anyone know hoe to create a field with lisp?..  The field is a costom name from a sheet set.  I searched the web and came up short.  It seems that here is now call to create a field with code???

Any help would be appreciated
« Last Edit: November 15, 2007, 01:06:51 PM by CAB »
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: How to create field with lisp?
« Reply #1 on: November 15, 2007, 01:32:57 PM »
« Last Edit: November 15, 2007, 01:35:59 PM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

LE

  • Guest
Re: How to create field with lisp?
« Reply #2 on: November 15, 2007, 02:16:28 PM »
I use fields only as part of all the predefined values for my blocks or titleblocks that I use in the sheet set manager - but none of them is via code.

You can copy the string values from each of the available ones in the FIELD dialog and from there recreate them - I did that in the past.


Here is some sample (in VBA) but can be easily ported to lisp

http://www.theswamp.org/index.php?topic=19766.msg241171#msg241171

Quote
text = "%<\AcObjProp Object(%<\_ObjId " + Str$(entObjectID) + ">%).Area>%"

(setq text  (strcat "%<\AcObjProp Object(%<\_ObjId "  itoa(entObjectID)  ">%).Area>%"))

then pass that into a text or mtext.... hope that the lisp code is right - well that's the idea :roll:
« Last Edit: November 15, 2007, 02:22:40 PM by LE »

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: How to create field with lisp?
« Reply #3 on: November 16, 2007, 12:47:08 PM »
Thanks Guys,  I'll look into it a bit more today.  These things are inuding me for some reason,  maybe its the sheet set part,  I dunno.

Thanks Again
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016