JeremiahM
2005-01-11, 11:18 PM
I work for an independent telephone co. I am trying to create a query in Map 3D that would prompt the user to select a service area, type in a pedestal number, and specify a radius around that pedestal to query in.
We have multiple service areas and many pedestal numbers are replicated in each. The service areas are defined by a boundary (Polyline) in Map and a field in our attached SQL database (links are already built). The pedestal number is a field in the SQL database linked to a block by a unique ID (via link template).
I know this can be done with a saved Map query and be run from a toolbar button.
Here is what I have so far...
(setq ade_cmddia_before_qry (getvar "cmddia"))
(setvar "cmddia" 0)
(ade_qryclear)
(ade_qrysettype "draw")
(ade_qrydefine '("" "" "" "Location" ("polyline" "polygon" "crossing" "?")""))
(ade_qrydefine '("AND" "" "" "SQL" ("JUNCTION_ID" "JUNCNAME = ")""))
(ade_qryexecute)
(setvar "cmddia" ade_cmddia_before_qry)
I think it would look like this...
1. Prompt to select boundary on screen (Location) or type name for (SQL)
2. Prompt for pedestal number (SQL) to retrieve linked BLOCK
3. Get x,y,z from insertion point of block and push to circle start point (Location)
4. Prompt for Radius of circle
5. Execute query.
Right now I am stuck on 2. I don't know how to get a prompt for the SQL so I can type in my pedestal number, everything I try to fake into the JUNCTION = (like '?' or blank) looks for that in the DB. I also know that number 3 is out of my league and it may take more than one query strung together.
If anyone can help that would be awesome, I am pretty sure a modification of this could be used for other applications, I know it can here.
Thanks a bunch,
Jeremiah
We have multiple service areas and many pedestal numbers are replicated in each. The service areas are defined by a boundary (Polyline) in Map and a field in our attached SQL database (links are already built). The pedestal number is a field in the SQL database linked to a block by a unique ID (via link template).
I know this can be done with a saved Map query and be run from a toolbar button.
Here is what I have so far...
(setq ade_cmddia_before_qry (getvar "cmddia"))
(setvar "cmddia" 0)
(ade_qryclear)
(ade_qrysettype "draw")
(ade_qrydefine '("" "" "" "Location" ("polyline" "polygon" "crossing" "?")""))
(ade_qrydefine '("AND" "" "" "SQL" ("JUNCTION_ID" "JUNCNAME = ")""))
(ade_qryexecute)
(setvar "cmddia" ade_cmddia_before_qry)
I think it would look like this...
1. Prompt to select boundary on screen (Location) or type name for (SQL)
2. Prompt for pedestal number (SQL) to retrieve linked BLOCK
3. Get x,y,z from insertion point of block and push to circle start point (Location)
4. Prompt for Radius of circle
5. Execute query.
Right now I am stuck on 2. I don't know how to get a prompt for the SQL so I can type in my pedestal number, everything I try to fake into the JUNCTION = (like '?' or blank) looks for that in the DB. I also know that number 3 is out of my league and it may take more than one query strung together.
If anyone can help that would be awesome, I am pretty sure a modification of this could be used for other applications, I know it can here.
Thanks a bunch,
Jeremiah