how to initialize the geolcation of the project?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I tested with modifying the parameters on the base points of the project. but it doesn't work.
if ((ActiveGeolocation) && (RefEasting) && (RefNorthing) && (ElevationOfTerrain) && (Azimuth))
{
ElementCategoryFilter filter = new ElementCategoryFilter(BuiltInCategory.OST_ProjectBasePoint);
FilteredElementCollector collector = new FilteredElementCollector(uiap.ActiveUIDocument.Document);
IList<Element> elements = collector.WherePasses(filter).ToElements();
Element ElBaseProject = null;
Parameter Param;
foreach (Element element in elements)
{
BasePoint Basepoint = element as BasePoint;
ElBaseProject = element;
using (Transaction t1 = new Transaction(uiap.ActiveUIDocument.Document, "Set Value GeoLocatization"))
{
t1.Start();
Param = element.get_Parameter(BuiltInParameter.BASEPOINT_EASTWEST_PARAM);
if (Param != null)
{
double Value = ConvertoUnit(iFCProperties_EASTWEST);
Param.Set(Value);
}
Param = element.get_Parameter(BuiltInParameter.BASEPOINT_NORTHSOUTH_PARAM);
if (Param != null)
{
double Value = ConvertoUnit(iFCProperties_NORTHSOUTH);
Param.Set(Value);
}
Param = element.get_Parameter(BuiltInParameter.BASEPOINT_ELEVATION_PARAM);
if (Param != null)
{
double Value = ConvertoUnit(iFCProperties_ELEVATION);
Param.Set(Value);
}
Param = element.get_Parameter(BuiltInParameter.BASEPOINT_ANGLETON_PARAM);
if (Param != null)
{
double Value = ConvertoUnit(iFCProperties_ANGLETON);
Param.Set(Value);
}
t1.Commit();
}
if (!Basepoint.IsShared)
break;
}
Philippe.