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

Is it possible to add EED to a viewport entity

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
444 Views, 7 Replies

Is it possible to add EED to a viewport entity

Hi there,
I tried to add extended entity data to a viewport but it didn't seem to
work. I noticed that ACAD already has EED attached. Can I not do this?
Thanks in advance for your help.
--
Phillip
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

You must use ActiveX automation to do this. Here are a couple of routines
that I developed for the purpose of adding xdata to vports.

http://code.acadx.com/visuallisp/041.htm
http://code.acadx.com/visuallisp/042.htm
--
Bobby C. Jones
www.AcadX.com
Message 3 of 8
Anonymous
in reply to: Anonymous

Thanks Bobby,
I'll give them a go. Nice site you have there too. Keep up the good work.
--
Phillip


"Bobby C. Jones" wrote in message
news:EBBE2B8D3E7237245A69E3F5F7F727F9@in.WebX.maYIadrTaRb...
> You must use ActiveX automation to do this. Here are a couple of
routines
> that I developed for the purpose of adding xdata to vports.
>
> http://code.acadx.com/visuallisp/041.htm
> http://code.acadx.com/visuallisp/042.htm
> --
> Bobby C. Jones
> www.AcadX.com
>
>
Message 4 of 8
Anonymous
in reply to: Anonymous

Hi Bobby,
Well this isn't going to be as easy as I had (thought) or hoped given my
VERY limited knowledge of activeX.
In your function ax:PutXData, there are two arguments required (vlaObj &
XData).
1. What is the vlaObj? Is that the entity name?
2. XData - Don't I need to supply the APPID as well?
If you don't have the time to explain, I'll understand. I can see I need to
read-up more on the subject.
--
Phillip


"Bobby C. Jones" wrote in message
news:EBBE2B8D3E7237245A69E3F5F7F727F9@in.WebX.maYIadrTaRb...
> You must use ActiveX automation to do this. Here are a couple of
routines
> that I developed for the purpose of adding xdata to vports.
>
> http://code.acadx.com/visuallisp/041.htm
> http://code.acadx.com/visuallisp/042.htm
> --
> Bobby C. Jones
> www.AcadX.com
>
>
Message 5 of 8
Anonymous
in reply to: Anonymous

Ok, I kinda' understand now about the vlaObj question I had. I see how to
convert an entity name to an ActiveX Object.
I'm not sure though why I don't need the APPID in PutXData... or do I?
--
Phillip

"per" wrote in message
news:C99EDB6017B41FE53ECA72B6E5DD501D@in.WebX.maYIadrTaRb...
> Hi Bobby,
> Well this isn't going to be as easy as I had (thought) or hoped given my
> VERY limited knowledge of activeX.
> In your function ax:PutXData, there are two arguments required (vlaObj &
> XData).
> 1. What is the vlaObj? Is that the entity name?
> 2. XData - Don't I need to supply the APPID as well?
> If you don't have the time to explain, I'll understand. I can see I need
to
> read-up more on the subject.
> --
> Phillip
>
>
> "Bobby C. Jones" wrote in message
> news:EBBE2B8D3E7237245A69E3F5F7F727F9@in.WebX.maYIadrTaRb...
> > You must use ActiveX automation to do this. Here are a couple of
> routines
> > that I developed for the purpose of adding xdata to vports.
> >
> > http://code.acadx.com/visuallisp/041.htm
> > http://code.acadx.com/visuallisp/042.htm
> > --
> > Bobby C. Jones
> > www.AcadX.com
> >
> >
>
>
Message 6 of 8
Anonymous
in reply to: Anonymous

Hello Phillip,
Time is short these days, but I'll see if I can help shed some light. The
vlaObj argument expects an ActiveX object. Visual LISP provides you a
simple way to convert entity names into ActiveX objects with the
(vlax-ename->vla-object ...) function:

(setq vpEntity (car (entsel "Select a floating viewport: "))
vla:vpEntity (vlax-ename->vla-object vpEntity))

If you successfully select a floating viewport, vla:vpEntity will contain a
reference to your ActiveX viewport object. Feed it to ax:GetXdata and
observe what it returns:

(ax:GetXdata vla:vpEntity "ACAD")

Returns something similar to this:

((1001 . "ACAD")
(1000 . "MVIEW")
(1002 . "{")
(1070 . 16)
(1010 0.0 0.0 0.0)
(1010 0.0 0.0 1.0)
(1040 . 0.0)
(1040 . 1384.78)

(1002 . "{")
(1003 . "A-Area-Bdry")

(1003 . "S-Roof-Trus")
(1002 . "}")
(1002 . "}")
)

Notice that the 1001 key contains the AppID. This is how you will need to
structure your xdata list to feed to ax:PutXdata. Be careful here! Unlike
the LISP method for storing xdata on an object, the ActiveX method will
automatically register your AppID if it's not already. A misspelled AppID
could cause you a lot of grief later.

I showed you one simple method of obtaining an ActiveX object. There are
others and the whole topic of Visual LISP's implementation of ActiveX is a
very broad topic. If you have other questions please ask. There are many
in this group whom are willing and more than able to help. Good luck.
--
Bobby C. Jones
www.AcadX.com
Message 7 of 8
Anonymous
in reply to: Anonymous

The 1001 key... Ahhhh, the missing link... I see said the blind man. Thanks
so much Bobby.
Have a great weekend.
--
Phillip

"Bobby C. Jones" wrote in message
news:3369DA7E3B1236028563BA4D5C766691@in.WebX.maYIadrTaRb...
> Hello Phillip,
> Time is short these days, but I'll see if I can help shed some light. The
> vlaObj argument expects an ActiveX object. Visual LISP provides you a
> simple way to convert entity names into ActiveX objects with the
> (vlax-ename->vla-object ...) function:
>
> (setq vpEntity (car (entsel "Select a floating viewport: "))
> vla:vpEntity (vlax-ename->vla-object vpEntity))
>
> If you successfully select a floating viewport, vla:vpEntity will contain
a
> reference to your ActiveX viewport object. Feed it to ax:GetXdata and
> observe what it returns:
>
> (ax:GetXdata vla:vpEntity "ACAD")
>
> Returns something similar to this:
>
> ((1001 . "ACAD")
> (1000 . "MVIEW")
> (1002 . "{")
> (1070 . 16)
> (1010 0.0 0.0 0.0)
> (1010 0.0 0.0 1.0)
> (1040 . 0.0)
> (1040 . 1384.78)
>
> (1002 . "{")
> (1003 . "A-Area-Bdry")
>
> (1003 . "S-Roof-Trus")
> (1002 . "}")
> (1002 . "}")
> )
>
> Notice that the 1001 key contains the AppID. This is how you will need to
> structure your xdata list to feed to ax:PutXdata. Be careful here!
Unlike
> the LISP method for storing xdata on an object, the ActiveX method will
> automatically register your AppID if it's not already. A misspelled AppID
> could cause you a lot of grief later.
>
> I showed you one simple method of obtaining an ActiveX object. There are
> others and the whole topic of Visual LISP's implementation of ActiveX is a
> very broad topic. If you have other questions please ask. There are many
> in this group whom are willing and more than able to help. Good luck.
> --
> Bobby C. Jones
> www.AcadX.com
>
>
>
Message 8 of 8
Anonymous
in reply to: Anonymous

Thanks..you too.
--
Bobby C. Jones
www.AcadX.com

"per" wrote in message
news:4193F584E2155BB813F784FDC5A68596@in.WebX.maYIadrTaRb...
> The 1001 key... Ahhhh, the missing link... I see said the blind man.
Thanks
> so much Bobby.
> Have a great weekend.
> --
> Phillip

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

Post to forums  

Autodesk Design & Make Report

”Boost