Within Topobase there are plenty of possibilities to find features. The most powerful way is probably using the Topobase Forms. Here you can search for almost everything. Either with a simple filter, an SQL filter, a geographic filter or a projection through foreign keys. Another easy way is the Advanced Generate Graphic. This button can be found under the Generate Graphic button in the Home - Display ribbon. Within the Advanced Generate Graphic dialog we put a control called Position Finder. The position finder is a one to many steps guide for finding a feature. For instance the user wants to search for an address, then he starts the address search, selects first the street and in the next step he selects the right building number. After he has done that he generates the graphic around this feature.
I like the concept of the position finder because it is a guided process where the search will give the user in 100% of the cases the correct result. If he searches for a Hydrant, he'll find it.
Why not taking the position finder out of the Advanced Generate Graphic dialog and place it somewhere more prominent. We could put it for instance into an AutoCAD palette set. Do you also think that's a good idea? Watch the movie to get an impression how this looks like:
If you need this gimmick NOW, just go ahead and download it here (109.9K).
To install the tool you have to copy and paste the file Topobase.Insiders.PositionFinder.dll to your Topobase Client 2010 bin directory (e.g. C:\Program Files\Autodesk Topobase Client 2010\bin). Start Topobase Client, open a workspace and type NETLOAD in the command window, select the file Topobase.Insiders.PositionFinder.dll. In order to load the file automatically with Topobase Client you can type TBPFRegister in the command window (TBPFUnregister removes it from the registry). To start the Position Finder type TBPF. Or just place a new button in the ribbon:
Hi guys,
it`s possible to get the code?
Posted by: Andres | June 23, 2009 at 06:30 AM
Excellent! Love the video demonstrations. I would love to put our streetnames into topobase so we can search like you demonstrated. Any idea on how I should go about doing this? Currently our streetnames and parcel data are in a DWG which we currently have to XREF into Topobase.
Thanks!
Posted by: Heath | June 23, 2009 at 06:42 AM
Hi Andres
there is really not much code to share! I took the position finder control from the Topobase.PositionFinder.dll and embedded it into an AutoCAD tool palette. BTW, Mike Tuersley had a very good AU class about how to do this (http://au.autodesk.com/?nd=class&session_id=910).
Then I react on the Position Finder "Geometry Changed" event and zoom to the location.
Here is the code:
///
/// Gets fired when the user has selected a feature with a geometry.
///
private void pfControl_GeometryCanged(object sender, System.EventArgs e)
{
Geometry geometry = pfControl.SelectedGeometry;
if (geometry == null || Document == null) return;
Point centerPoint;
if (geometry is Point)
{
centerPoint = (Point)geometry;
Document.Map.ZoomGoTo(centerPoint, centerPoint);
}
else
{
BoundingCube cube = geometry.Bounds;
centerPoint = cube.CenterPoint;
Document.Map.ZoomGoTo(new Point(cube.MinX, cube.MinY), new Point(cube.MaxX, cube.MaxY));
}
}
Posted by: Andreas Boos | June 23, 2009 at 06:47 AM
Hi Heath
there are several ways to bring in DWG data into Topobase.
One approach which definitely works is using the bulk copy functionality of Map3D to load the data into Oracle (http://augiru.augi.com/content/library/au07/data/paper/GS204-3.pdf) and then use the Topobase Schema Conversion tool (in Topobase Administrator) to create a Topobase feature class out of the Oracle database table.
Posted by: Andreas Boos | June 23, 2009 at 07:32 AM
Hi Andreas,
That sounds great! I'm trying to access it, but am getting HTTP 408/409 Server Busy errors.
Posted by: Heath | June 23, 2009 at 07:54 AM
I have it now. The URL has a " ) " at the end of it.
Posted by: Heath | June 23, 2009 at 07:55 AM
I tried on TB09 and it works too. It´s fine.
Posted by: Roman Janecek | July 03, 2009 at 12:58 AM
Hello,
Would you be able to provide steps to make an icon in the Ribbon?
Thanks
Posted by: Heath | July 29, 2009 at 05:44 PM
Hi Heath
sure!
1) type in CUI in the AutoCAD command prompt, that should open the Customize User Interface dialog
2) in the Command List (on the left hand side of the dialog) press the "Create a new command" button
3) in the Properties window of the new command (right hand side) change the name of the command, for instance "Position Finder", change also the macro to "^C^CTBPF" and choose an image
4) after you have done that you can now add the command to the ribbon. Go to the tree on the top left and locate the desired ribbon panel. For instance: ACAD / Ribbon / Panels / Settings - Palettes / Row 1.
5) Now you can simply drag and drop the "Position Finder" command from the command list to the selected ribbon panel.
6) save the CUI file and close the dialog
That's it, please let me know if that helps!
Thanks
Andreas
Posted by: Andreas Boos | July 30, 2009 at 02:28 AM
This is a great functionality.
Just wondering, is the Position Finder a DocumentFlyIn? How did/do you load/display the a DocumentFlyIn through the ACAD command?
Thanks
Posted by: HyVong | November 10, 2009 at 06:47 AM
Hi HyVong
no, this Feature Search is not a DocumentFlyIn. It is an AutoCAD PaletteSet which is started and initialized by an AutoCAD command:
[CommandMethod("TBPF")]
public static void Initialize()
{ ... }
Here you find the necessary classes:
using Autodesk.AutoCAD.Windows;
using Autodesk.AutoCAD.Runtime;
Within the code you can access the Application instance (and its document) through the singleton Application.Instance.
Hope this helps!
Posted by: Andreas Boos | November 10, 2009 at 06:56 AM
Thank you Andreas
Posted by: HyVong | November 11, 2009 at 05:24 AM