Yannick Leduc,

That works perfectly...thanks for such a fast
response!

Eric
----- Original Message -----
From: "Leduc, Yannick" <[EMAIL PROTECTED]>
To: "'Eric Frost / HR and Associates, Inc.'" <[EMAIL PROTECTED]>
Sent: Monday, August 14, 2000 12:41 PM
Subject: RE: MI LAYER_INFO_NAME and ObjectInfo


Hi Eric,

try this:

Include "MapBasic.Def"

Dim szLayerName As String
szLayerName = LayerInfo(FrontWindow(), 1, LAYER_INFO_NAME)

Fetch First From szLayerName

Dim obj_type As Integer
Dim objt As object
dim Alias_obj As Alias

alias_obj = szLayerName+".obj"
objt = alias_obj
obj_type = ObjectInfo(objt, OBJ_INFO_TYPE)

When I use a Fetch, I define an alias that will point the object, and then,
I put the object in a variable. It works. I hope it will do the same for
you.

Good luck

Yannick Leduc


-----Message d'origine-----
De : Eric Frost / HR and Associates, Inc.
[mailto:[EMAIL PROTECTED]]
Envoyé : 14 août, 2000 13:09
À : [EMAIL PROTECTED]
Objet : MI LAYER_INFO_NAME and ObjectInfo



What is wrong with this code:

Include "MapBasic.Def"

Dim szLayerName As String
szLayerName = LayerInfo(FrontWindow(), 1, LAYER_INFO_NAME)

Fetch First From szLayerName

Dim obj_type As Integer
obj_type = ObjectInfo(szLayerName.obj, OBJ_INFO_TYPE)

I have tried all sorts of work-arounds like assigning the object to an
object variable and Run Command but have not hit on the solution.

Thanks in advance!

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to