Author Topic: entmake or vla-addline  (Read 2591 times)

0 Members and 1 Guest are viewing this topic.

curmudgeon

  • Newt
  • Posts: 194
entmake or vla-addline
« on: October 01, 2013, 11:50:16 AM »
From Afralisp,

"As the line was created from scratch, and created using Visual LISP functions, we already have a reference to the line Object (myLine). We can now safely run our reactor function and attach it to our Line."

It looks like there are some commands for the purpose of translating entities to objects, and back....
vlax-ename->vla-object
vlax-vla-object->ename

Is there reason for me to learn so many commands that seem to be "vl" specific?
Opinions solicited.
Never express yourself more clearly than you are able to think.

Vaidas

  • Newt
  • Posts: 66
Re: entmake or vla-addline
« Reply #1 on: October 01, 2013, 12:33:57 PM »
From my tests vla-addline works faster within BricsCAD but entmake within AutoCAD.
(mapcar 'chr '(107 105 116 111 120 46 99 111 109))

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: entmake or vla-addline
« Reply #2 on: October 01, 2013, 02:50:46 PM »
Learning those "VL" commands gives a better understanding of the object structure, which is much more important when dealing with other APIs such as dotNET.  Reading and changing properies can also be easier to follow - (vla-get-SomePropertName target_object) vs. (cdr (assoc DXF_ID (entget target_entity))).
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

curmudgeon

  • Newt
  • Posts: 194
Re: entmake or vla-addline
« Reply #3 on: October 01, 2013, 05:33:59 PM »
Thanks guys. I believe I will take on the "vl" commands a little faster than as needed, but not much.
Confession: I am already addicted to vlsort.
Never express yourself more clearly than you are able to think.

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: entmake or vla-addline
« Reply #4 on: October 02, 2013, 10:03:08 AM »
Have a look at (vl-catch-all-apply ...) and (vl-catch-all-error-p ...).  Extremely handy, even when not directly dealing with VLISP functions.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: entmake or vla-addline
« Reply #5 on: October 02, 2013, 01:58:48 PM »
And the vlax-curve-* functions make life a whole lot easier when working with polylines / splines / arcs. No need to have any trig (or at least very little) to get exactly what you want.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

curmudgeon

  • Newt
  • Posts: 194
Re: entmake or vla-addline
« Reply #6 on: October 02, 2013, 03:10:13 PM »
Those particular vl commands are now on my list(s).
Thank you.
Never express yourself more clearly than you are able to think.