logo

img

Knowledgebase Home | Contact Knowledgebase Home | Contact
Search the Knowledgebase Browse by Category
How can I enter a Query expression in a script?
User Opinions
No users have voted.

How would you rate this answer?
Helpful
Not helpful
Enter the Query expression in a script the same way you would enter it in the program, the only difference is the quotes.

In a script, a single set of double quotes surrounds the entire expression, and anywhere within the string where quotes are needed (ie. around the PID or SID values), put two double quotes.

**********
Sub Main

Dim mvApp As Object
Set mvApp = CreateObject("MapViewer.Application")
mvApp.Visible = True

Dim Docs As Object
Set Docs = mvApp.Documents

Dim Plot As Object
Set Plot = Docs.Open(mvApp.ApplicationFolder+"\samples\gradient.gsm")

Plot.Query (Verb:=mvQueryVerbApplyProperty, Region:=mvQueryMap, Point:=True, Expression:="PID=""El Paso"" and SID=""TX""", SymbolIndex:=12)

End Sub
Visitor Comments
No visitor comments posted. Post a comment
Related Questions
Attachments
No attachments were found.
Products