Author Topic: Good Reactor Lisp  (Read 4119 times)

0 Members and 1 Guest are viewing this topic.

deegeecees

  • Guest
Good Reactor Lisp
« on: September 28, 2005, 10:15:06 AM »
Here's one for Louis (and anyone else with reactor exp.),

Looking into attaching a text entity to a viewport so that the scale (eg. 1/8"=1'-0" etc.) is reflected in the text. I'm going to start it, but I have a feeling I won't even get half of it done before someone else *cough*<Louis> posts something. I'm new to reactors, so this is more of a learning event for me.  :laugh:

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Good Reactor Lisp
« Reply #1 on: September 28, 2005, 11:16:56 AM »
Degeecees,

Take a look at the field command:

Under field names list highlight object.
Select viewport..property custom scale and format how you need

HTH

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Crank

  • Water Moccasin
  • Posts: 1503
Re: Good Reactor Lisp
« Reply #2 on: September 28, 2005, 11:19:07 AM »
You don't need reactors for this. Try the FIELD-command.
Vault Professional 2023     +     AEC Collection

Crank

  • Water Moccasin
  • Posts: 1503
Re: Good Reactor Lisp
« Reply #3 on: September 28, 2005, 11:20:41 AM »
To slow... :doa:
Vault Professional 2023     +     AEC Collection

deegeecees

  • Guest
Re: Good Reactor Lisp
« Reply #4 on: September 28, 2005, 11:49:42 AM »
At work, 2004's the latest AutoCAD, and does not have that capability...  Does it?

Edit: Nope. I wanted to learn about reactors anyway.  :lol:
« Last Edit: September 28, 2005, 12:13:24 PM by deegeecees »

whdjr

  • Guest
Re: Good Reactor Lisp
« Reply #5 on: September 28, 2005, 11:57:16 AM »
I think Fields started in 2005.

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Good Reactor Lisp
« Reply #6 on: September 28, 2005, 12:14:14 PM »
Something to start with....uses 2005 field codes....

Code: [Select]
(defun c:feeld (/ a s1 index ent obj obj_ID txt)
  (setq a 0)
  (command ".undo" "begin")
  (vl-load-com)
  (if (setq sl (ssget ":S" '((0 . "VIEWPORT"))

       )
      )
    (progn
      (setq index -1)
      (while (< (setq index (1+ index)) (sslength sl))
(setq ent    (ssname sl index)
      obj    (vlax-ename->vla-object ent)
      obj_ID (vlax-get-property obj 'ObjectID)
      txt    (strcat "%<\\AcObjProp Object(%<\\_ObjId "
     (rtos obj_ID)
     ">%).CustomScale \\f \"%lu2%qf2816:1\">%"
     )
)
(command "text"
"j"
"mc"
pause
(* (getvar "dimscale") 0.15)
"0"
txt
)
      )
    )
  )
  (command ".undo" "end")
)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

deegeecees

  • Guest
Re: Good Reactor Lisp
« Reply #7 on: September 28, 2005, 12:20:44 PM »
Something to start with....uses 2005 field codes....

Ronjonp, look up at my previous post. I could use that code at home though.
« Last Edit: September 28, 2005, 01:21:04 PM by deegeecees »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Good Reactor Lisp
« Reply #8 on: September 28, 2005, 08:43:32 PM »
ron,
How much faster is your system,
HP xw4200 CMT Intel Pentium 4 3.2GHz (HT) / 2GB DDR2 / GeForce 6800 GT 256MB
than say a 1.4ghz system? Is the speed increase just a little snapper or does
it knock your sock off?


As for your lisp, If you use this it won't crash when the textsize is switched
between 0 and >0

 
Code: [Select]
(if (= (cdr (assoc 40 (tblsearch "style" (getvar "textstyle")))) 0)
   (command "text" pt "" "0" txt)
   (command "text" pt "0" txt)
 )
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.

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Good Reactor Lisp
« Reply #9 on: September 29, 2005, 10:42:53 AM »
CAB,

The machine I have now is smokin :). We have a couple 2ghtz machines in the office and this one blows them outta the water.

You thinking about getting a new machine?

Thanks for the textstyle tip.

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Good Reactor Lisp
« Reply #10 on: September 29, 2005, 11:03:26 AM »
Yes, with all the stuff I have loaded & more added the machine seems a little slow at times.
Maybe time to upgrade my 1.2ghz AMD :-)
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.

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Good Reactor Lisp
« Reply #11 on: September 29, 2005, 11:11:57 AM »
Probably opening a can of worms but...for what it's worth

From my experience...the Pentium 4's I've used seem to run AutoCAD faster than AMD's

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

deegeecees

  • Guest
Re: Good Reactor Lisp
« Reply #12 on: September 29, 2005, 11:20:27 AM »
Hey thanks for the code guys...


Still workin on it.


I need a 30 hr day.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Good Reactor Lisp
« Reply #13 on: September 29, 2005, 11:56:56 AM »
Probably opening a can of worms but...for what it's worth

From my experience...the Pentium 4's I've used seem to run AutoCAD faster than AMD's
Thanks for the tip.
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.