getentity

getentity

Anonymous
Not applicable
289 Views
3 Replies
Message 1 of 4

getentity

Anonymous
Not applicable
I'm trying to get an entity handle with the Utility.getentity method,
however I get a "syntax error". The other "gets" work fine. I think I've
copied the code from the example correctly.

loAcadDwg=loAcadApp.activedocument
loAcadUtility=loAcadDwg.utility
loAcadUtility.GetEntity loBubble,basepoint,"get it"

I guess there are other ways to accomplish my task but thought I would try
this. Any ideas? Thanks

Dan Aldridge
0 Likes
290 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
On Wed, 23 May 2001 07:29:10 -0700, "Dan Aldridge"
wrote:

»I'm trying to get an entity handle with the Utility.getentity method,
»however I get a "syntax error". The other "gets" work fine. I think I've
»copied the code from the example correctly.
»
»loAcadDwg=loAcadApp.activedocument
»loAcadUtility=loAcadDwg.utility
»loAcadUtility.GetEntity loBubble,basepoint,"get it"

You're missing "Set" from each of the assignments but I would expect
"Object variable or With block variable not set". Which line gives
you the "syntax error"?

--
Paul Marshall
pmarshal@vulcraft-al.com
0 Likes
Message 3 of 4

Anonymous
Not applicable
Paul,

I'm still having trouble with the getentity method. I forgot to mention
that I am using Visual Foxpro. Sorry. Although I have not had any problems
accessing the Acad Object Model to date it could be an issue in this case.
Thanks again for your comments.

Dan Aldridge
"Paul Marshall" wrote in message
news:6hkngt40un3qbhnc5gomkapvlpq7i0vdu0@4ax.com...
> On Wed, 23 May 2001 07:29:10 -0700, "Dan Aldridge"
> wrote:
>
> »I'm trying to get an entity handle with the Utility.getentity method,
> »however I get a "syntax error". The other "gets" work fine. I think I've
> »copied the code from the example correctly.
> »
> »loAcadDwg=loAcadApp.activedocument
> »loAcadUtility=loAcadDwg.utility
> »loAcadUtility.GetEntity loBubble,basepoint,"get it"
>
> You're missing "Set" from each of the assignments but I would expect
> "Object variable or With block variable not set". Which line gives
> you the "syntax error"?
>
> --
> Paul Marshall
> pmarshal@vulcraft-al.com
0 Likes
Message 4 of 4

Anonymous
Not applicable
Public Sub GetEntityHandle()
Dim objAcadEntity As AcadEntity
Dim varPoint As Variant
'there is no error checking in this routine
ThisDrawing.Utility.GetEntity objAcadEntity, varPoint, "Select an entity"
MsgBox objAcadEntity.Handle
End Sub


--
Find out more about the NEW "AutoCAD Visual Basic Programmers Reference" -
the ultimate guide to Visual Basic programming for R14/2000/2000i and 2002
mailto:omnisource@worldnet.att.net?subject=NewVBTitle


Joe Sutphin
Author of "AutoCAD 2000 VBA Programmers Reference"
ISBN #1861002564



"Dan Aldridge" wrote in message
news:82697C48DF37166A55A7FBC4452C001F@in.WebX.maYIadrTaRb...
> Paul,
>
> I'm still having trouble with the getentity method. I forgot to mention
> that I am using Visual Foxpro. Sorry. Although I have not had any
problems
> accessing the Acad Object Model to date it could be an issue in this case.
> Thanks again for your comments.
>
> Dan Aldridge
> "Paul Marshall" wrote in message
> news:6hkngt40un3qbhnc5gomkapvlpq7i0vdu0@4ax.com...
> > On Wed, 23 May 2001 07:29:10 -0700, "Dan Aldridge"
> > wrote:
> >
> > »I'm trying to get an entity handle with the Utility.getentity method,
> > »however I get a "syntax error". The other "gets" work fine. I think
I've
> > »copied the code from the example correctly.
> > »
> > »loAcadDwg=loAcadApp.activedocument
> > »loAcadUtility=loAcadDwg.utility
> > »loAcadUtility.GetEntity loBubble,basepoint,"get it"
> >
> > You're missing "Set" from each of the assignments but I would expect
> > "Object variable or With block variable not set". Which line gives
> > you the "syntax error"?
> >
> > --
> > Paul Marshall
> > pmarshal@vulcraft-al.com
>
>
0 Likes