Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help: Saving and Loading vla-objects

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
190 Views, 4 Replies

Help: Saving and Loading vla-objects



Hello,

I try to save a list of vla-objects in a file.

When I load this list the vla-objects are destroyed.

Example:

The list entry of a vla-object before saving the data.

[0] #<VLA-OBJECT  IACADLWPOLYLINE   02F99E94>

This object is recognized as a vla-object.

The list entrys of a vla-object after loading the data.

[0] #<VLA-OBJECT

[1] IACADLWPOLYLINE

[2] 02F99E94>

The three Listentrys are recognized as Symbols.

Saving the list with LISP Datatypes works fine, but not with vla-objects.

Any idea ?

4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

A VLA-object is a COM wrapper around an AutoCAD entity. Your handle to
this wrapper is nothing more than a pointer, a memory address. That
address will not point to the same data between instances of AutoCAD
as it allocated dynamically.

On the other hand, an entity handle as returned by AutoLISP is
permanent and will always represent the same object within a given
drawing file (assuming the object still exists at the time you use the
handle).

--
"That's no ordinary rabbit."
http://www.acadx.com


"Matthias Senff" wrote in message
news:3BB96C94.994C9C66@weisstalwerk.de...
Hello,
I try to save a list of vla-objects in a file.
When I load this list the vla-objects are destroyed.
Example:
The list entry of a vla-object before saving the data.
[0] #
This object is recognized as a vla-object.
The list entrys of a vla-object after loading the data.
[0] #
[1] IACADLWPOLYLINE
[2] 02F99E94>
The three Listentrys are recognized as Symbols.
Saving the list with LISP Datatypes works fine, but not with
vla-objects.
Any idea ?
Message 3 of 5
Anonymous
in reply to: Anonymous

What exactly is meant by "wrapper". I have always thought of a vla-object
as "the" object itself, hence, the release-object woes of RRB and others.
--
Cliff

"Frank Oquendo" wrote in message
news:D3AB765D6D6CC9A8E2865D9CEE4A4AD2@in.WebX.maYIadrTaRb...
| A VLA-object is a COM wrapper around an AutoCAD entity. Your handle to
| this wrapper is nothing more than a pointer, a memory address. That
| address will not point to the same data between instances of AutoCAD
| as it allocated dynamically.
|
| On the other hand, an entity handle as returned by AutoLISP is
| permanent and will always represent the same object within a given
| drawing file (assuming the object still exists at the time you use the
| handle).
|
| --
| "That's no ordinary rabbit."
| http://www.acadx.com
|
|
| "Matthias Senff" wrote in message
| news:3BB96C94.994C9C66@weisstalwerk.de...
| Hello,
| I try to save a list of vla-objects in a file.
| When I load this list the vla-objects are destroyed.
| Example:
| The list entry of a vla-object before saving the data.
| [0] #
| This object is recognized as a vla-object.
| The list entrys of a vla-object after loading the data.
| [0] #
| [1] IACADLWPOLYLINE
| [2] 02F99E94>
| The three Listentrys are recognized as Symbols.
| Saving the list with LISP Datatypes works fine, but not with
| vla-objects.
| Any idea ?
|
|
Message 4 of 5
Anonymous
in reply to: Anonymous

Cliff, come over to the dark side and these mysterious objects and terms
become very apparent. The dark side is very powerful and can open up
entirely new worlds to you 🙂 It takes no more than creating your first
class module to understand what is meant by 'wrapper'. For now I'm going to
defer to Frank for a complete explanation because he is definitely darker
than I 🙂
--
Bobby C. Jones
Dots & Parens living in harmony...
Message 5 of 5
Anonymous
in reply to: Anonymous

| Cliff, come over to the dark side...

NO! You can't be my father!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost