How to change symbol of point file using MapBasic

494 views
Skip to first unread message

R@HuL

unread,
Jun 30, 2011, 11:54:49 PM6/30/11
to mapi...@googlegroups.com
Hi,

I have a point file to show on Map. But i want to change the symbol of
this file other than default. My symbol is custom symbol (say
Tower.bmp) and will be applied on the point file and then save with
this point layer.

All i want to do this by using Map Basic code.

Any help?

--
Rahul

Cynthia T

unread,
Jul 1, 2011, 1:12:54 AM7/1/11
to MapInfo-L
I'm not 100% sure, but you may try (in Set Map Window):
Global Symbol ("C:\image.bmp",0,12,0)

R@HuL

unread,
Jul 2, 2011, 1:13:14 AM7/2/11
to mapi...@googlegroups.com
Thanks for the solution,
But this is working till we didn't close the tab. If we close the tab
and open again, the symbol get lost.
I want to assign custom symbol for the point layer every time when
open tab file for operations.

Regards,
Rahul

On Fri, Jul 1, 2011 at 10:42 AM, Cynthia T <cynth...@gmail.com> wrote:
> I'm not 100% sure, but you may try (in Set Map Window):
> Global Symbol ("C:\image.bmp",0,12,0)
>

> --
> You received this message because you are subscribed to the
> Google Groups "MapInfo-L" group.To post a message to this group, send
> email to mapi...@googlegroups.com
> To unsubscribe from this group, go to:
> http://groups.google.com/group/mapinfo-l/subscribe?hl=en
> For more options, information and links to MapInfo resources (searching
> archives, feature requests, to visit our Wiki, visit the Welcome page at
> http://groups.google.com/group/mapinfo-l?hl=en
>

--
Rahul
Sent from Nokia

Cynthia T

unread,
Jul 4, 2011, 10:39:29 PM7/4/11
to MapInfo-L
As far as I know, symbol information are not saved in the TAB file
(it's stored within the database itself), so I'm not sure if you can
actually change symbol by adding statement in the .tab. Normally I
just put a statement in the WOR.

I tried adding symbol statement in the tab file, but nothing seems to
work so far.

The only alternative I can think of is to create a new TAB file with
the customize symbol, something along the line:

create point (oldtab.long,oldtab.lat) symbol ("image.bmp",0,12,0)

Anyone else has any idea?

Peter Horsbøll Møller

unread,
Jul 11, 2011, 5:29:48 AM7/11/11
to mapi...@googlegroups.com
This has been discussed before on the list:

Here is one link to have a look at:

This describes how to do it using lines.
For symbols you would create a function like this:

Function STYLChangeSymbol(ByVal oPoint As Object, ByVal symNew As Symbol) 
STYLChangeSymbol = oPoint 

   '**You might want to add a check here to see if oPoint really is a point object 

   Alter Object oPoint 
      Info OBJ_INFO_SYMBOL, symNew 

STYLChangeSymbol = oPoint 

End Function 


Peter Horsbøll Møller
Pitney Bowes Business Insight - MapInfo


2011/7/5 Cynthia T <cynth...@gmail.com>

--
Reply all
Reply to author
Forward
0 new messages