Recent Posts

Pages: [1] 2 3 ... 10
1
AutoLISP (Vanilla / Visual) / Re: VL vs. ENTITY functions
« Last post by Grrr1337 on Today at 12:41:01 pm »
IMO Using object oriented programming is so much easier (cause one just modifies properties and invokes methods).

Visual LISP (as VBA) is to OOP what Canada Dry is to whiskey: the syntax may look like but it's not at all the same flavor...

I agree - its just once you have tried it, then you have an overall idea whats hapenning. The only problem is getting used to the new flavor...
Atleast I think so. You are more experienced than me.
2
AutoLISP (Vanilla / Visual) / Re: VL vs. ENTITY functions
« Last post by Didge on Today at 10:16:43 am »
"Command" calls are far easier for a CAD Draughtsman to understand and very often they're more than capable of automating intensive draughting operations.  "Command" calls however used to be substantially slower than direct database manipulation but this usually amounted to no more than a few extra seconds. Thankfully this difference in speed isn't as much since version 2015.  It's also worth noting that "command" calls cannot be invoked while a DCL dialogue is on-screen which may limit their use somewhat.

After many years of professional coding I find a little bit of each technique seems to offer the most appropriate solutions but I will always have a soft spot for the old-school entity list functions.

I must admit that watching hundreds of "command" calls does offer a strange mesmerising pleasure, similar to watching an old pen plotter at work.
3
AutoLISP (Vanilla / Visual) / Re: VL vs. ENTITY functions
« Last post by gile on Today at 10:02:23 am »
IMO Using object oriented programming is so much easier (cause one just modifies properties and invokes methods).

Visual LISP (as VBA) is to OOP what Canada Dry is to whiskey: the syntax may look like but it's not at all the same flavor...
4
CAD General / Re: BricsCAD users
« Last post by MP on Today at 09:25:07 am »
5
AutoLISP (Vanilla / Visual) / Re: VL vs. ENTITY functions
« Last post by Grrr1337 on Today at 09:02:04 am »
IMO Using object oriented programming is so much easier (cause one just modifies properties and invokes methods).
At one point of my learining I ended up with this concept:
"Hey just learn how to write handy subfunctions, by using VL* functions
and how to use and manipulate assoc lists, so you could provide different arguments from there."

Where I could associate the subfunction as my weapon, the assoc list as my weapon's magazine and every set of provided arguments as a bullet.  :grinwink:
After that I was turtling slowly to the not-so-easy to work with DXF/elist manipulation.
Ofcourse without alot of practice and a good tutors to guide you, aswell to point out your mistakes - for me that would remain just as a nice theory for LISP starters.


One nice thing about using Ent/VL functions instead of command (other than speeds) is that you can make them work through ObjDBX on DWG files not currently open - this works a LOT faster than using a script to open multiple DWGs and modify them.

I've left with the impression that ObjectDBX supports only ActiveX (the VL* functions). Perhaps more correctly is to be called advantage over activex for such tasks.
By learning some rules from here :
Code: [Select]
No Selection Sets (use of ssget, ssname, ssdel etc)
No Command calls (command "_.line" ... etc)
No ent* methods (entmod, entupd etc)
No access to System Variables (getvar, setvar, vla-getvariable, vla-setvariable etc)
6
AutoLISP (Vanilla / Visual) / Re: VL vs. ENTITY functions
« Last post by irneb on Today at 03:05:09 am »
There's good and bad in all three ways of doing it. Usually the VL/Ent functions perform around similar speeds, with the cmd stuff tending to run slower as each command first gets interpreted.

However, there's some instances when a command call makes a lot more sense and/or reduces the amount of work. One nice thing about using Ent/VL functions instead of command (other than speeds) is that you can make them work through ObjDBX on DWG files not currently open - this works a LOT faster than using a script to open multiple DWGs and modify them.

As for ent/vl, there are some cases where vl gives better results and does things more automatically (especially if things like dictionaries come to play). Others where ent gives better results (e.g. with extended data).

The VL stuff is actually just a wrapper over the ActiveX modules which used to be how people programmed using VBA. Lately (a few years ago) VB started to die down, but the ActiveX ties to ACad is still available, and thus the VL functions still have their uses. Unfortunately since ActiveX (and especially VBA) is a Microsoft-only product these are not available if running something like ACad for Mac - in that case you're stuck with only the CMD or Ent functions.

I have found though, that the ent functions give you greater access to raw data than the vl stuff. Especially asthe ActiveX libraries for ACad hasn't been updated in at least a decade. Meaning much of the newer tools / entity types aren't properly modifiable.

There's also a 4th set of functions which was introduced mainly due to ActiveX not getting updated and not available on Mac. The propertyvalue functions actually work on the same stuff as if you're programming in C++ through ObjectARX. In some cases these are a boon (able to get to stuff more easily than trying to work with RAW data through ent), but usually they're just an extra way of doing the same as you could using the ent functions. Unfortunately though these are only implemented for property get/set, for creation / deletion / copy / etc. you need one of the other sets instead.

Then of course there's the DotNet things too. Though only if the dotnet library being loaded implements a lisp function to open its methods to AutoLisp. In some cases this gives abilities which was either near impossible or very tedious. But again, these aren't available for Mac.
7
AutoLISP (Vanilla / Visual) / Re: Understanding using Polylines within Lisps
« Last post by MeasureUp on December 14, 2017, 11:08:21 pm »
Yes, "osmode" setting is the trick.

BTW from HELP, it gives info of "osmode"
Type: Integer
Saved in: Registry
IOW, "osmode" setting is not stored in drawing file.
This explains that PCs may show different results when the same LSP loaded.

8
AutoLISP (Vanilla / Visual) / Re: Lisp
« Last post by FriendFromArea51 on December 14, 2017, 09:59:22 pm »
Thank you!
9
AutoLISP (Vanilla / Visual) / Re: Anonymous Block
« Last post by Aldo on December 14, 2017, 03:31:45 pm »
very grateful, it's just what I needed
10
AutoLISP (Vanilla / Visual) / Re: Lisp
« Last post by PKENEWELL on December 14, 2017, 02:17:58 pm »
 :-D Cheers!
Pages: [1] 2 3 ... 10