New Text Document
New Text Document
IO;
using [Link];
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using Application = [Link];
using Polyline = [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using Viewport = [Link];
namespace [Link]
{
public class CClass
{
var ed = [Link];
var db = [Link];
return p;
}
// var ed = [Link];
// var db = [Link];
// return p;
//}
public Point3d LatLongFromPoint2d(Point3d P)
{
var doc = [Link];
var ed = [Link];
var db = [Link];
return p;
}
[Link]();
return outPt;
}
}
return p2;
}
public string getBetween(string Data, string St, string En)
{
int Start, End;
if ([Link](St) && [Link](En))
{
Start = [Link](St, 0) + [Link];
End = [Link](En, Start);
return [Link](Start, End - Start);
}
else
{
return "";
}
}
if (doc == null)
return;
var ed = [Link];
var db = [Link];
try
{
var gdId = [Link];
hasGeoData = true;
}
catch { }
if (hasGeoData)
{
[Link]("\nDrawing already has geo-location data!");
return;
}
[Link] = msId;
[Link]();
[Link] = "WORLD-MERCATOR";
[Link] = [Link];
var wcsPt = [Link](PC);
[Link] = wcsPt;
[Link] = PC;
[Link]("_.GEOMAP", "_AERIAL");
}
if (clockwise)
{
bulge = -bulge;
}
}
return bulge;
}
public Point2d ArcCentroid(Point2d start, Point2d end, Point2d cen, double
tmpArea)
{
double chord = [Link](end);
double angle = (end - start).Angle;
return Polar2d(cen, angle - ([Link] / 2.0), (chord * chord * chord) /
(12.0 * tmpArea));
}
if ([Link](0) == [Link])
{
double[] datas = GetArcGeom(pl, [Link](0), 0, 1);
area = datas[0];
cen = new Point2d(datas[1], datas[2]) * datas[0];
}
for (int i = 1; i < last; i++)
{
tmpArea = TriangleAlgebricArea(p0, pl.GetPoint2dAt(i),
pl.GetPoint2dAt(i + 1));
tmpPoint = TriangleCentroid(p0, pl.GetPoint2dAt(i),
pl.GetPoint2dAt(i + 1));
cen += (tmpPoint * tmpArea).GetAsVector();
area += tmpArea;
if ([Link](i) == [Link])
{
double[] datas = GetArcGeom(pl, [Link](i), i, i + 1);
area += datas[0];
cen += new Vector2d(datas[1], datas[2]) * datas[0];
}
}
if ([Link](last) == [Link])
{
double[] datas = GetArcGeom(pl, [Link](last), last, 0);
area += datas[0];
cen += new Vector2d(datas[1], datas[2]) * datas[0];
}
cen = [Link](area);
Point3d result = new Point3d(cen.X, cen.Y, [Link]);
return [Link]([Link]([Link]));
}
}
documentloc = [Link]();
database = [Link];
transaction = [Link]();
blockTable = [Link]([Link],
[Link]) as BlockTable;
layerTable = [Link]([Link],
[Link]) as LayerTable;
blockTableRecordMe =
[Link](blockTable[[Link]], [Link])
as BlockTableRecord;
blockTableRecordPe =
[Link](blockTable[[Link]], [Link])
as BlockTableRecord;
editor = [Link];
}
if (dist > 0)
{
DBObjectCollection PloffSet1 = [Link](dist);
[Link]();
DBObjectCollection PloffSet2 = [Link](dist);
[Link]();
Polyline pl1buffer = new Polyline();
Polyline pl2buffer = new Polyline();
foreach (Polyline item in PloffSet1) pl1buffer = item;
foreach (Polyline item in PloffSet2) pl2buffer = item;
//Line ln = new Line([Link], [Link]);
//[Link](ln);
//[Link](pl2buffer);
//[Link] = true;
//REVISAR ESTO
//[Link]();
[Link](pl1buffer);
[Link](pl2buffer);
}
else
{
[Link](rute);
}
foreach (Polyline PlB in pllist)
{
for (int i = 0; i < [Link]; i++)
{
[Link](PlB.GetPoint3dAt(i));
if (PlB.GetPoint3dAt(i) !=
PlB.GetPoint3dAt([Link] - 1))
{
if ([Link](i).ToString() == "Arc")
{
for (double j =
[Link](PlB.GetPoint3dAt(i)) + 1; j <
[Link](PlB.GetPoint3dAt(i + 1)); j++)
{
if ())
{
[Link]([Link](j));
}
}
}
}
}
if ([Link])
{
if ([Link]([Link] - 1).ToString()
== "Arc")
{
for (double j =
[Link](PlB.GetPoint3dAt([Link] - 1)) + 1; j < [Link];
j++)
{
[Link]([Link](j));
}
}
[Link]([Link]);
}
}
}
return buffer;
}
Insert(pl, true);
}
return LBuffer;
}
[Link](OB, true);
}
[Link](OB, true);
}
[Link](Br);
[Link](Br, true);
}
else
{
[Link]("Error When Copying Or Inserting Block");
}
}
BlockTableRecord blockDef =
blockTable[name].GetObject([Link]) as BlockTableRecord;
if (M)
[Link](OB);
else
[Link](OB);
[Link](OB, true);
DynamicBlockReferencePropertyCollection pc =
[Link];
if (obj is AttributeDefinition)
{
AttributeDefinition attDef = obj as AttributeDefinition;
[Link] = true;
[Link](attRef);
[Link](attRef, true);
}
}
}
}
[Link](OB, true);
}
if (M)
[Link](OB);
else
[Link](OB);
[Link](OB, true);
}
[Link](OB, true);
}
[Link](OB, true);
if (OB is BlockReference)
{
BlockReference blockReference = (BlockReference)OB;
BlockTableRecord blockDef =
blockTable[name].GetObject([Link]) as BlockTableRecord;
if ((attDef != null))
{
[Link] = "";
[Link] = true;
[Link](attRef);
[Link](attRef, true);
}
}
}
}
return En;
}
if(!Find)
{
if (Copy_Block(Block_Name))
{
return true;
}
else
{
return false;
}
}
else
{
return true;
}
}
foreach(string S in Layers)
{
if (S == Layer_Name)
{
Find = true;
}
}
if (!Find)
{
if (Copy_Layer(Layer_Name))
{
return true;
}
else
{
return false;
}
}
else
{
return true;
}
}
try
{
[Link]
Sor_Trans_Manager = Sor_Db.TransactionManager;
BlockTable Block_Table =
(BlockTable)Sor_Trans.GetObject(Sor_Db.BlockTableId, [Link], false);
BlockTableRecord Block_Table_Record =
(BlockTableRecord)Sor_Trans.GetObject(Block_Table_Id, [Link], false);
if (!Block_Table_Record.IsAnonymous && !
Block_Table_Record.IsLayout && Block_Table_Record.Name == Block_Name)
Blocks_Id.Add(Block_Table_Id);
Block_Table_Record.Dispose();
RETURN = true;
}
catch ([Link] ex)
{
[Link]("\nError during copy: " + [Link]);
RETURN = false;
}
Sor_Db.Dispose();
return RETURN;
}
return false;
}
else
{
var ids = new ObjectIdCollection();
[Link](layerTable[Layer_Name]);
var mapping = new IdMapping();
[Link](ids, [Link], mapping,
[Link], false);
return true;
}
}
}
return RETURN;
}
}
// start angle.)
if ([Link] > [Link])
{
newStart = [Link] - 8 * [Link](1);
}
else
{
newStart = [Link];
}
// Bulge is defined as the tan of
return bulge;
if (bulge != 0.0)
{
double[] datas = GetArcGeom(pl, bulge, 0, 1);
area = datas[0];
cen = new Point2d(datas[1], datas[2]) * datas[0];
}
for (int i = 1; i < last; i++)
{
tmpArea = TriangleAlgebricArea(p0, pl.GetPoint2dAt(i),
pl.GetPoint2dAt(i + 1));
tmpPoint = TriangleCentroid(p0, pl.GetPoint2dAt(i),
pl.GetPoint2dAt(i + 1));
cen += (tmpPoint * tmpArea).GetAsVector();
area += tmpArea;
bulge = [Link](i);
if (bulge != 0.0)
{
double[] datas = GetArcGeom(pl, bulge, i, i + 1);
area += datas[0];
cen += new Vector2d(datas[1], datas[2]) * datas[0];
}
}
bulge = [Link](last);
if (bulge != 0.0)
{
double[] datas = GetArcGeom(pl, bulge, last, 0);
area += datas[0];
cen += new Vector2d(datas[1], datas[2]) * datas[0];
}
cen = [Link](area);
Point3d result = new Point3d(cen.X, cen.Y, [Link]);
return [Link]([Link]([Link]));
}
if (bulge != 0.0)
{
double[] datas = GetArcGeom(pl, bulge, 0, 1);
area = datas[0];
cen = new Point2d(datas[1], datas[2]) * datas[0];
}
for (int i = 1; i < last; i++)
{
tmpArea = TriangleAlgebricArea(p0, pl.GetPoint2dAt(i),
pl.GetPoint2dAt(i + 1));
tmpPoint = TriangleCentroid(p0, pl.GetPoint2dAt(i),
pl.GetPoint2dAt(i + 1));
cen += (tmpPoint * tmpArea).GetAsVector();
area += tmpArea;
bulge = [Link](i);
if (bulge != 0.0)
{
double[] datas = GetArcGeom(pl, bulge, i, i + 1);
area += datas[0];
cen += new Vector2d(datas[1], datas[2]) * datas[0];
}
}
bulge = [Link](last);
if (bulge != 0.0)
{
double[] datas = GetArcGeom(pl, bulge, last, 0);
area += datas[0];
cen += new Vector2d(datas[1], datas[2]) * datas[0];
}
cen = [Link](area);
Point3d result = new Point3d(cen.X, cen.Y, [Link]);
result = [Link]([Link]([Link]));
return new Point2d(result.X, result.Y);
}
#endregion
}
// while (![Link])
// {
// string[] comas;
// string line = [Link]();
// string[] values = [Link](',');
// if (lines == 0)
// for (int c = 0; c < [Link]; c++)
// if (values[c] == "pole_owner")
// pole_owner_p = c;
// else if (values[c] == "material")
// material_p = c;
// else if (values[c] == "pole_class")
// pole_class_p = c;
// else if (values[c] == "ground")
// ground_p = c;
// else if (values[c] == "telco_first_attachment")
// telco_first_attachment_p = c;
// else if (values[c] == "telco_second_attachment")
// telco_second_attachment_p = c;
// else if (values[c] == "comcast")
// comcast_p = c;
// else if (values[c] == "catv_second_attachment")
// catv_second_attachment_p = c;
// else if (values[c] == "streetlight")
// streetlight_p = c;
// else if (values[c] == "secondaryneutral")
// secondaryneutral_p = c;
// else if (values[c] == "transfer" || values[c] ==
"general_notes")
// transfer_p = c;
// else if (values[c] == "pole_tag")
// pole_tag_p = c;
// if (lines == P && P != 0)
// {
// pole_owner = values[pole_owner_p];
// if (pole_tag_p != 0)
// {
// pole_tag = values[pole_tag_p];
// }
// if(pole_class_p != 0)
// pole_class = values[pole_class_p];
// if (ground_p != 0)
// ground = values[ground_p];
// if(telco_first_attachment_p != 0)
// telco_first_attachment =
values[telco_first_attachment_p];
// if(telco_second_attachment_p != 0)
// telco_second_attachment =
values[telco_second_attachment_p];
// if(comcast_p != 0)
// comcast = values[comcast_p];
// if(catv_second_attachment_p != 0)
// catv_second_attachment =
values[catv_second_attachment_p];
// if(streetlight_p != 0)
// streetlight = values[streetlight_p];
// if(secondaryneutral_p != 0)
// secondaryneutral = values[secondaryneutral_p];
// if(transfer_p != 0)
// transfer = values[transfer_p];
// try
// {
// if (pole_tag != " " && pole_tag != "")
// {
// Data += "Pole#: " +
Convert.ToInt32(pole_tag).ToString();
// }
// }
// catch (Exception)
// {
// Data += pole_tag;
// }
// if ([Link]("Yes") ||
[Link]("Transfer"))
// {
// Data += "\n" + transfer;
// }
// }
// else
// {
// try
// {
// if (pole_tag != " " && pole_tag != "")
// {
// Data += "Pole#: " +
Convert.ToInt32(pole_tag).ToString();
// }
// }
// catch (Exception)
// {
// Data += pole_tag;
// }
// }
// lines++;
// }
// return [Link]();
// }
// catch (Exception Ex)
// {
// [Link](Ex + "");
// return "Explote";
// }
//}
while (![Link])
{
string[] comas;
string line = [Link]();
string[] values = [Link](',');
if (lines == 0)
for (int c = 0; c < [Link]; c++)
if (values[c] == "fulcrum_id")
fulcrum_id_p = c;
else if (values[c] == "fulcrum_parent_id")
fulcrum_parent_id_p = c;
else if (values[c] == "fulcrum_record_id")
fulcrum_record_id_p = c;
else if (values[c] == "version")
version_p = c;
else if (values[c] == "latitude")
latitude_p = c;
else if (values[c] == "longitude")
longitude_p = c;
else if (values[c] == "geometry")
geometry_p = c;
else if (values[c] == "created_at")
created_at_p = c;
else if (values[c] == "updated_at")
updated_at_p = c;
else if (values[c] == "created_by")
created_by_p = c;
else if (values[c] == "updated_by")
updated_by_p = c;
else if (values[c] == "pole_owner")
pole_owner_p = c;
else if (values[c] == "pole_tag")
pole_tag_p = c;
else if (values[c] == "pole_address_sub_thoroughfare")
pole_address_sub_thoroughfare_p = c;
else if (values[c] == "pole_address_thoroughfare")
pole_address_thoroughfare_p = c;
else if (values[c] == "pole_address_suite")
pole_address_suite_p = c;
else if (values[c] == "pole_address_locality")
pole_address_locality_p = c;
else if (values[c] == "pole_address_sub_admin_area")
pole_address_sub_admin_area_p = c;
else if (values[c] == "pole_address_admin_area")
pole_address_admin_area_p = c;
else if (values[c] == "pole_address_postal_code")
pole_address_postal_code_p = c;
else if (values[c] == "pole_address_country")
pole_address_country_p = c;
else if (values[c] == "pole_address_full")
pole_address_full_p = c;
else if (values[c] == "pole_boc_eop_measurement")
pole_boc_eop_measurement_p = c;
else if (values[c] == "pole_class")
pole_class_p = c;
else if (values[c] == "material")
material_p = c;
else if (values[c] == "strand_size")
strand_size_p = c;
else if (values[c] == "guying")
guying_p = c;
else if (values[c] == "joint_use_anchor_1")
joint_use_anchor_1_p = c;
else if (values[c] == "proposed_or_existing_1")
proposed_or_existing_1_p = c;
else if (values[c] == "anchor_size_1")
anchor_size_1_p = c;
else if (values[c] == "down_guy_wire_size_1")
down_guy_wire_size_1_p = c;
else if (values[c] == "lead_1")
lead_1_p = c;
else if (values[c] == "guy_quantity_1")
guy_quantity_1_p = c;
else if (values[c] == "guy_hoa_1")
guy_hoa_1_p = c;
else if (values[c] == "pull_1")
pull_1_p = c;
else if (values[c] == "bearing_1")
bearing_1_p = c;
else if (values[c] == "number_of_eyes_1")
number_of_eyes_1_p = c;
else if (values[c] == "joint_use_anchor_2")
joint_use_anchor_2_p = c;
else if (values[c] == "proposed_or_existing_2")
proposed_or_existing_2_p = c;
else if (values[c] == "anchor_size_2")
anchor_size_2_p = c;
else if (values[c] == "down_guy_wire_size_2")
down_guy_wire_size_2_p = c;
else if (values[c] == "lead_2")
lead_2_p = c;
else if (values[c] == "guy_quantity_2")
guy_quantity_2_p = c;
else if (values[c] == "guy_hoa_2")
guy_hoa_2_p = c;
else if (values[c] == "pull_2")
pull_2_p = c;
else if (values[c] == "bearing_2")
bearing_2_p = c;
else if (values[c] == "number_of_eyes_2")
number_of_eyes_2_p = c;
else if (values[c] == "joint_use_anchor_3")
joint_use_anchor_3_p = c;
else if (values[c] == "proposed_or_existing_3")
proposed_or_existing_3_p = c;
else if (values[c] == "anchor_size_3")
anchor_size_3_p = c;
else if (values[c] == "down_guy_wire_size_3")
down_guy_wire_size_3_p = c;
else if (values[c] == "lead_3")
lead_3_p = c;
else if (values[c] == "guy_quantity_3")
guy_quantity_3_p = c;
else if (values[c] == "guy_hoa_3")
guy_hoa_3_p = c;
else if (values[c] == "pull_3")
pull_3_p = c;
else if (values[c] == "bearing_3")
bearing_3_p = c;
else if (values[c] == "number_of_eyes_3")
number_of_eyes_3_p = c;
else if (values[c] == "joint_use_anchor_4")
joint_use_anchor_4_p = c;
else if (values[c] == "proposed_or_existing_4")
proposed_or_existing_4_p = c;
else if (values[c] == "anchor_size_4")
anchor_size_4_p = c;
else if (values[c] == "down_guy_wire_size_4")
down_guy_wire_size_4_p = c;
else if (values[c] == "lead_4")
lead_4_p = c;
else if (values[c] == "guy_quantity_4")
guy_quantity_4_p = c;
else if (values[c] == "guy_hoa_4")
guy_hoa_4_p = c;
else if (values[c] == "pull_4")
pull_4_p = c;
else if (values[c] == "bearing_4")
bearing_4_p = c;
else if (values[c] == "number_of_eyes_4")
number_of_eyes_4_p = c;
else if (values[c] == "telco_first_attachment")
telco_first_attachment_p = c;
else if (values[c] == "telco_second_attachment")
telco_second_attachment_p = c;
else if (values[c] == "roadside_attachment")
roadside_attachment_p = c;
else if (values[c] == "catv_first_attachment")
catv_first_attachment_p = c;
else if (values[c] == "catv_second_attachment")
catv_second_attachment_p = c;
else if (values[c] == "roadside_attachment_2")
roadside_attachment_2_p = c;
else if (values[c] == "provider_1")
provider_1_p = c;
else if (values[c] == "hoa_1")
hoa_1_p = c;
else if (values[c] == "provider_2")
provider_2_p = c;
else if (values[c] == "hoa_2")
hoa_2_p = c;
else if (values[c] == "provider_3")
provider_3_p = c;
else if (values[c] == "hoa_3")
hoa_3_p = c;
else if (values[c] == "provider_4")
provider_4_p = c;
else if (values[c] == "hoa_4")
hoa_4_p = c;
else if (values[c] == "provider_5")
provider_5_p = c;
else if (values[c] == "hoa_5")
hoa_5_p = c;
else if (values[c] == "secondaryneutral")
secondaryneutral_p = c;
else if (values[c] == "streetlight")
streetlight_p = c;
else if (values[c] == "transformer")
transformer_p = c;
else if (values[c] == "ground")
ground_p = c;
else if (values[c] == "general_notes")
general_notes_p = c;
else if (values[c] == "damage_notes")
damage_notes_p = c;
else if (values[c] == "photo")
photo_p = c;
else if (values[c] == "photo_caption")
photo_caption_p = c;
else if (values[c] == "photo_url")
photo_url_p = c;
if (fulcrum_id_p != 0)
fulcrum_id = values[fulcrum_id_p];
if (fulcrum_parent_id_p != 0)
fulcrum_parent_id = values[fulcrum_parent_id_p];
if (fulcrum_record_id_p != 0)
fulcrum_record_id = values[fulcrum_record_id_p];
if (version_p != 0)
version = values[version_p];
if (latitude_p != 0)
latitude = values[latitude_p];
if (longitude_p != 0)
longitude = values[longitude_p];
if (geometry_p != 0)
geometry = values[geometry_p];
if (created_at_p != 0)
created_at = values[created_at_p];
if (updated_at_p != 0)
updated_at = values[updated_at_p];
if (created_by_p != 0)
created_by = values[created_by_p];
if (updated_by_p != 0)
updated_by = values[updated_by_p];
if (pole_owner_p != 0)
pole_owner = values[pole_owner_p];
if (pole_tag_p != 0)
pole_tag = values[pole_tag_p];
if (pole_address_sub_thoroughfare_p != 0)
pole_address_sub_thoroughfare =
values[pole_address_sub_thoroughfare_p];
if (pole_address_thoroughfare_p != 0)
pole_address_thoroughfare =
values[pole_address_thoroughfare_p];
if (pole_address_suite_p != 0)
pole_address_suite = values[pole_address_suite_p];
if (pole_address_locality_p != 0)
pole_address_locality = values[pole_address_locality_p];
if (pole_address_sub_admin_area_p != 0)
pole_address_sub_admin_area =
values[pole_address_sub_admin_area_p];
if (pole_address_admin_area_p != 0)
pole_address_admin_area =
values[pole_address_admin_area_p];
if (pole_address_postal_code_p != 0)
pole_address_postal_code =
values[pole_address_postal_code_p];
if (pole_address_country_p != 0)
pole_address_country = values[pole_address_country_p];
if (pole_address_full_p != 0)
pole_address_full = values[pole_address_full_p];
if (pole_boc_eop_measurement_p != 0)
pole_boc_eop_measurement =
values[pole_boc_eop_measurement_p];
if (pole_class_p != 0)
pole_class = values[pole_class_p];
if (material_p != 0)
material = values[material_p];
if (strand_size_p != 0)
strand_size = values[strand_size_p];
if (guying_p != 0)
guying = values[guying_p];
if (joint_use_anchor_1_p != 0)
joint_use_anchor_1 = values[joint_use_anchor_1_p];
if (proposed_or_existing_1_p != 0)
proposed_or_existing_1 = values[proposed_or_existing_1_p];
if (anchor_size_1_p != 0)
anchor_size_1 = values[anchor_size_1_p];
if (down_guy_wire_size_1_p != 0)
down_guy_wire_size_1 = values[down_guy_wire_size_1_p];
if (lead_1_p != 0)
lead_1 = values[lead_1_p];
if (guy_quantity_1_p != 0)
guy_quantity_1 = values[guy_quantity_1_p];
if (guy_hoa_1_p != 0)
guy_hoa_1 = values[guy_hoa_1_p];
if (pull_1_p != 0)
pull_1 = values[pull_1_p];
if (bearing_1_p != 0)
bearing_1 = values[bearing_1_p];
if (number_of_eyes_1_p != 0)
number_of_eyes_1 = values[number_of_eyes_1_p];
if (joint_use_anchor_2_p != 0)
joint_use_anchor_2 = values[joint_use_anchor_2_p];
if (proposed_or_existing_2_p != 0)
proposed_or_existing_2 = values[proposed_or_existing_2_p];
if (anchor_size_2_p != 0)
anchor_size_2 = values[anchor_size_2_p];
if (down_guy_wire_size_2_p != 0)
down_guy_wire_size_2 = values[down_guy_wire_size_2_p];
if (lead_2_p != 0)
lead_2 = values[lead_2_p];
if (guy_quantity_2_p != 0)
guy_quantity_2 = values[guy_quantity_2_p];
if (guy_hoa_2_p != 0)
guy_hoa_2 = values[guy_hoa_2_p];
if (pull_2_p != 0)
pull_2 = values[pull_2_p];
if (bearing_2_p != 0)
bearing_2 = values[bearing_2_p];
if (number_of_eyes_2_p != 0)
number_of_eyes_2 = values[number_of_eyes_2_p];
if (joint_use_anchor_3_p != 0)
joint_use_anchor_3 = values[joint_use_anchor_3_p];
if (proposed_or_existing_3_p != 0)
proposed_or_existing_3 = values[proposed_or_existing_3_p];
if (anchor_size_3_p != 0)
anchor_size_3 = values[anchor_size_3_p];
if (down_guy_wire_size_3_p != 0)
down_guy_wire_size_3 = values[down_guy_wire_size_3_p];
if (lead_3_p != 0)
lead_3 = values[lead_3_p];
if (guy_quantity_3_p != 0)
guy_quantity_3 = values[guy_quantity_3_p];
if (guy_hoa_3_p != 0)
guy_hoa_3 = values[guy_hoa_3_p];
if (pull_3_p != 0)
pull_3 = values[pull_3_p];
if (bearing_3_p != 0)
bearing_3 = values[bearing_3_p];
if (number_of_eyes_3_p != 0)
number_of_eyes_3 = values[number_of_eyes_3_p];
if (joint_use_anchor_4_p != 0)
joint_use_anchor_4 = values[joint_use_anchor_4_p];
if (proposed_or_existing_4_p != 0)
proposed_or_existing_4 = values[proposed_or_existing_4_p];
if (anchor_size_4_p != 0)
anchor_size_4 = values[anchor_size_4_p];
if (down_guy_wire_size_4_p != 0)
down_guy_wire_size_4 = values[down_guy_wire_size_4_p];
if (lead_4_p != 0)
lead_4 = values[lead_4_p];
if (guy_quantity_4_p != 0)
guy_quantity_4 = values[guy_quantity_4_p];
if (guy_hoa_4_p != 0)
guy_hoa_4 = values[guy_hoa_4_p];
if (pull_4_p != 0)
pull_4 = values[pull_4_p];
if (bearing_4_p != 0)
bearing_4 = values[bearing_4_p];
if (number_of_eyes_4_p != 0)
number_of_eyes_4 = values[number_of_eyes_4_p];
if (telco_first_attachment_p != 0)
telco_first_attachment = values[telco_first_attachment_p];
if (telco_second_attachment_p != 0)
telco_second_attachment =
values[telco_second_attachment_p];
if (roadside_attachment_p != 0)
roadside_attachment = values[roadside_attachment_p];
if (catv_first_attachment_p != 0)
catv_first_attachment = values[catv_first_attachment_p];
if (catv_second_attachment_p != 0)
catv_second_attachment = values[catv_second_attachment_p];
if (roadside_attachment_2_p != 0)
roadside_attachment_2 = values[roadside_attachment_2_p];
if (provider_1_p != 0)
provider_1 = values[provider_1_p];
if (hoa_1_p != 0)
hoa_1 = values[hoa_1_p];
if (provider_2_p != 0)
provider_2 = values[provider_2_p];
if (hoa_2_p != 0)
hoa_2 = values[hoa_2_p];
if (provider_3_p != 0)
provider_3 = values[provider_3_p];
if (hoa_3_p != 0)
hoa_3 = values[hoa_3_p];
if (provider_4_p != 0)
provider_4 = values[provider_4_p];
if (hoa_4_p != 0)
hoa_4 = values[hoa_4_p];
if (provider_5_p != 0)
provider_5 = values[provider_5_p];
if (hoa_5_p != 0)
hoa_5 = values[hoa_5_p];
if (secondaryneutral_p != 0)
secondaryneutral = values[secondaryneutral_p];
if (streetlight_p != 0)
streetlight = values[streetlight_p];
if (transformer_p != 0)
transformer = values[transformer_p];
if (ground_p != 0)
ground = values[ground_p];
if (general_notes_p != 0)
general_notes = values[general_notes_p];
if (damage_notes_p != 0)
damage_notes = values[damage_notes_p];
if (photo_p != 0)
photo = values[photo_p];
if (photo_caption_p != 0)
photo_caption = values[photo_caption_p];
if (photo_url_p != 0)
photo_url = values[photo_url_p];
if (lines == P && P != 0)
{
if (pole_owner != " " && pole_owner != "")
{
Data += "pole_owner: " + pole_owner + "\n";
}
if (pole_tag != " " && pole_tag != "")
{
Data += "pole_tag: " + pole_tag + "\n";
}
if (pole_address_full != " " && pole_address_full != "")
{
Data += "pole_address_full: " + pole_address_full + "\
n";
}
if (pole_boc_eop_measurement != " " &&
pole_boc_eop_measurement != "")
{
Data += "pole_boc_eop_measurement: " +
pole_boc_eop_measurement + "\n";
}
if (pole_class != " " && pole_class != "")
{
Data += "pole_class: " + pole_class + "\n";
}
if (material != " " && material != "")
{
Data += "material: " + material + "\n";
}
if (strand_size != " " && strand_size != "")
{
Data += "strand_size: " + strand_size + "\n";
}
if (guying != " " && guying != "")
{
Data += "guying: " + guying + "\n";
}
if (joint_use_anchor_1 != " " && joint_use_anchor_1 != "")
{
Data += "joint_use_anchor_1: " + joint_use_anchor_1 +
"\n";
}
if (proposed_or_existing_1 != " " && proposed_or_existing_1
!= "")
{
Data += "proposed_or_existing_1: " +
proposed_or_existing_1 + "\n";
}
if (anchor_size_1 != " " && anchor_size_1 != "")
{
Data += "anchor_size_1: " + anchor_size_1 + "\n";
}
if (down_guy_wire_size_1 != " " && down_guy_wire_size_1 !=
"")
{
Data += "down_guy_wire_size_1: " + down_guy_wire_size_1
+ "\n";
}
if (lead_1 != " " && lead_1 != "")
{
Data += "lead_1: " + lead_1 + "\n";
}
if (guy_quantity_1 != " " && guy_quantity_1 != "")
{
Data += "guy_quantity_1: " + guy_quantity_1 + "\n";
}
if (guy_hoa_1 != " " && guy_hoa_1 != "")
{
Data += "guy_hoa_1: " + guy_hoa_1 + "\n";
}
if (pull_1 != " " && pull_1 != "")
{
Data += "pull_1: " + pull_1 + "\n";
}
if (bearing_1 != " " && bearing_1 != "")
{
Data += "bearing_1: " + bearing_1 + "\n";
}
if (number_of_eyes_1 != " " && number_of_eyes_1 != "")
{
Data += "number_of_eyes_1: " + number_of_eyes_1 + "\n";
}
if (joint_use_anchor_2 != " " && joint_use_anchor_2 != "")
{
Data += "joint_use_anchor_2: " + joint_use_anchor_2 +
"\n";
}
if (proposed_or_existing_2 != " " && proposed_or_existing_2
!= "")
{
Data += "proposed_or_existing_2: " +
proposed_or_existing_2 + "\n";
}
if (anchor_size_2 != " " && anchor_size_2 != "")
{
Data += "anchor_size_2: " + anchor_size_2 + "\n";
}
if (down_guy_wire_size_2 != " " && down_guy_wire_size_2 !=
"")
{
Data += "down_guy_wire_size_2: " + down_guy_wire_size_2
+ "\n";
}
if (lead_2 != " " && lead_2 != "")
{
Data += "lead_2: " + lead_2 + "\n";
}
if (guy_quantity_2 != " " && guy_quantity_2 != "")
{
Data += "guy_quantity_2: " + guy_quantity_2 + "\n";
}
if (guy_hoa_2 != " " && guy_hoa_2 != "")
{
Data += "guy_hoa_2: " + guy_hoa_2 + "\n";
}
if (pull_2 != " " && pull_2 != "")
{
Data += "pull_2: " + pull_2 + "\n";
}
if (bearing_2 != " " && bearing_2 != "")
{
Data += "bearing_2: " + bearing_2 + "\n";
}
if (number_of_eyes_2 != " " && number_of_eyes_2 != "")
{
Data += "number_of_eyes_2: " + number_of_eyes_2 + "\n";
}
if (joint_use_anchor_3 != " " && joint_use_anchor_3 != "")
{
Data += "joint_use_anchor_3: " + joint_use_anchor_3 +
"\n";
}
if (proposed_or_existing_3 != " " && proposed_or_existing_3
!= "")
{
Data += "proposed_or_existing_3: " +
proposed_or_existing_3 + "\n";
}
if (anchor_size_3 != " " && anchor_size_3 != "")
{
Data += "anchor_size_3: " + anchor_size_3 + "\n";
}
if (down_guy_wire_size_3 != " " && down_guy_wire_size_3 !=
"")
{
Data += "down_guy_wire_size_3: " + down_guy_wire_size_3
+ "\n";
}
if (lead_3 != " " && lead_3 != "")
{
Data += "lead_3: " + lead_3 + "\n";
}
if (guy_quantity_3 != " " && guy_quantity_3 != "")
{
Data += "guy_quantity_3: " + guy_quantity_3 + "\n";
}
if (guy_hoa_3 != " " && guy_hoa_3 != "")
{
Data += "guy_hoa_3: " + guy_hoa_3 + "\n";
}
if (pull_3 != " " && pull_3 != "")
{
Data += "pull_3: " + pull_3 + "\n";
}
if (bearing_3 != " " && bearing_3 != "")
{
Data += "bearing_3: " + bearing_3 + "\n";
}
if (number_of_eyes_3 != " " && number_of_eyes_3 != "")
{
Data += "number_of_eyes_3: " + number_of_eyes_3 + "\n";
}
if (joint_use_anchor_4 != " " && joint_use_anchor_4 != "")
{
Data += "joint_use_anchor_4: " + joint_use_anchor_4 +
"\n";
}
if (proposed_or_existing_4 != " " && proposed_or_existing_4
!= "")
{
Data += "proposed_or_existing_4: " +
proposed_or_existing_4 + "\n";
}
if (anchor_size_4 != " " && anchor_size_4 != "")
{
Data += "anchor_size_4: " + anchor_size_4 + "\n";
}
if (down_guy_wire_size_4 != " " && down_guy_wire_size_4 !=
"")
{
Data += "down_guy_wire_size_4: " + down_guy_wire_size_4
+ "\n";
}
if (lead_4 != " " && lead_4 != "")
{
Data += "lead_4: " + lead_4 + "\n";
}
if (guy_quantity_4 != " " && guy_quantity_4 != "")
{
Data += "guy_quantity_4: " + guy_quantity_4 + "\n";
}
if (guy_hoa_4 != " " && guy_hoa_4 != "")
{
Data += "guy_hoa_4: " + guy_hoa_4 + "\n";
}
if (pull_4 != " " && pull_4 != "")
{
Data += "pull_4: " + pull_4 + "\n";
}
if (bearing_4 != " " && bearing_4 != "")
{
Data += "bearing_4: " + bearing_4 + "\n";
}
if (number_of_eyes_4 != " " && number_of_eyes_4 != "")
{
Data += "number_of_eyes_4: " + number_of_eyes_4 + "\n";
}
if (telco_first_attachment != " " && telco_first_attachment
!= "")
{
Data += "telco_first_attachment: " +
telco_first_attachment + "\n";
}
if (telco_second_attachment != " " &&
telco_second_attachment != "")
{
Data += "telco_second_attachment: " +
telco_second_attachment + "\n";
}
if (roadside_attachment != " " && roadside_attachment !=
"")
{
Data += "roadside_attachment: " + roadside_attachment +
"\n";
}
if (catv_first_attachment != " " && catv_first_attachment !
= "")
{
Data += "catv_first_attachment: " +
catv_first_attachment + "\n";
}
if (catv_second_attachment != " " && catv_second_attachment
!= "")
{
Data += "catv_second_attachment: " +
catv_second_attachment + "\n";
}
if (roadside_attachment_2 != " " && roadside_attachment_2 !
= "")
{
Data += "roadside_attachment_2: " +
roadside_attachment_2 + "\n";
}
if (provider_1 != " " && provider_1 != "")
{
Data += "provider_1: " + provider_1 + "\n";
}
if (hoa_1 != " " && hoa_1 != "")
{
Data += "hoa_1: " + hoa_1 + "\n";
}
if (provider_2 != " " && provider_2 != "")
{
Data += "provider_2: " + provider_2 + "\n";
}
if (hoa_2 != " " && hoa_2 != "")
{
Data += "hoa_2: " + hoa_2 + "\n";
}
if (provider_3 != " " && provider_3 != "")
{
Data += "provider_3: " + provider_3 + "\n";
}
if (hoa_3 != " " && hoa_3 != "")
{
Data += "hoa_3: " + hoa_3 + "\n";
}
if (provider_4 != " " && provider_4 != "")
{
Data += "provider_4: " + provider_4 + "\n";
}
if (hoa_4 != " " && hoa_4 != "")
{
Data += "hoa_4: " + hoa_4 + "\n";
}
if (provider_5 != " " && provider_5 != "")
{
Data += "provider_5: " + provider_5 + "\n";
}
if (hoa_5 != " " && hoa_5 != "")
{
Data += "hoa_5: " + hoa_5 + "\n";
}
if (secondaryneutral != " " && secondaryneutral != "")
{
Data += "secondaryneutral: " + secondaryneutral + "\n";
}
if (streetlight != " " && streetlight != "")
{
Data += "streetlight: " + streetlight + "\n";
}
if (transformer != " " && transformer != "")
{
Data += "transformer: " + transformer + "\n";
}
if (ground != " " && ground != "")
{
Data += "ground: " + ground + "\n";
}
if (general_notes != " " && general_notes != "")
{
Data += "general_notes: " + general_notes + "\n";
}
if (damage_notes != " " && damage_notes != "")
{
Data += "damage_notes: " + damage_notes + "\n";
}
}
lines++;
}
return [Link]();
}
catch (Exception Ex)
{
[Link](Ex + "");
return "Explote";
}
}
while (![Link])
{
string line = [Link]();
string[] values = [Link](',');
if (lines == 0)
for (int c = 0; c < [Link]; c++)
if (values[c] == "photo")
photo_p = c;
else if (values[c] == "latitude")
latitude_p = c;
else if (values[c] == "longitude")
longitude_p = c;
if (lines != 0)
{
decimal lat1 = [Link]([Link](Lat), 5);
decimal lon1 = [Link]([Link](Lon), 5);
decimal lat2 =
[Link]([Link](values[latitude_p]), 5);
decimal lon2 =
[Link]([Link](values[longitude_p]), 5);
while (![Link])
{
string line = [Link]();
string[] values = [Link](',');
if (lines == 0)
for (int c = 0; c < [Link]; c++)
if (values[c] == "proposed_or_existing_1")
proposed_or_existing_1_p = c;
else if (values[c] == "bearing_1")
bearing_1_p = c;
else if (values[c] == "lead_1")
lead_1_p = c;
if (lines == P && P != 0)
{
proposed_or_existing_1 = values[proposed_or_existing_1_p];
bearing_1 = values[bearing_1_p];
lead_1 = values[lead_1_p];
if (proposed_or_existing_1 == "Proposed")
Data += "PROPOSED DOWNGUY AND ANCHOR AT " + lead_1 + "'
LEAD FROM POLE ";
else if (proposed_or_existing_1 == "Existing")
Data += "EXISTING DOWNGUY BEARING" + " " + bearing_1;
//return Dow_Anc_Details.ToUpper();
}
lines++;
}
return [Link]();
}
catch (Exception Ex)
{
[Link](Ex + "");
return "Explote";
}
}
}
while (![Link])
{
string line = [Link]();
string[] values = [Link](',');
if (lines == 0)
for (int c = 0; c < [Link]; c++)
if (values[c] == "environment")
environment_p = c;
else if (values[c] == "aerial_value")
aerial_value_p = c;
if (lines == P && P != 0)
{
environment = values[environment_p];
aerial_value = values[aerial_value_p];
if (environment == "Buried")
Data = "{\\fArial|b1|;\\LDIRECTIONAL BORE -MAX\nBACK
REAMER SIZE =6\" \\P}INSTALL 1\'-2\" HDPE \\PCONDUIT PULL 1-FIBER OPTIC CABLE \\
P(84\" MIN. GROUND COVER)";
else if (environment == "Aerial")
Data = "{\\fArial|b1|;\\LOVERLASH \\P}OVERLASH 1 - FOC
TO \\PEXISTING STRAND \\P{\\C5;" + aerial_value + "\'}";
}
lines++;
}
return Data;
}
catch (Exception Ex)
{
[Link](Ex + "");
return "Explote";
}
}
}
try
{
var reader = new StreamReader(S);
int lines = 0;
while (![Link])
{
string line = [Link]();
string[] values = [Link](',');
if (lines == 0)
for (int c = 0; c < [Link]; c++)
if (values[c] == "buried_reference")
buried_reference_p = c;
else if (values[c] == "buried_ref_notes")
buried_ref_notes_p = c;
if (lines == P && P != 0)
{
buried_reference = values[buried_reference_p];
//buried_ref_notes = values[buried_ref_notes_p];
while (![Link])
{
string line = [Link]();
string[] values = [Link](',');
if (lines == 0)
for (int c = 0; c < [Link]; c++)
if (values[c] == "buried_ref_photos")
buried_ref_photos_P = c;
else if (values[c] == "latitude")
latitude_p = c;
else if (values[c] == "longitude")
longitude_p = c;
if (lines != 0)
{
decimal lat1 = [Link]([Link](Lat), 5);
decimal lon1 = [Link]([Link](Lon), 5);
decimal lat2 =
[Link]([Link](values[latitude_p]), 5);
decimal lon2 =
[Link]([Link](values[longitude_p]), 5);
try
{
var reader = new StreamReader(S);
int lines = 0;
while (![Link])
{
string line = [Link]();
string[] values = [Link](',');
if (lines == 0)
for (int c = 0; c < [Link]; c++)
if (values[c] == "midspan_clearance")
midspan_clearance_p = c;
if (lines == P && P != 0)
{
midspan_clearance = values[midspan_clearance_p];
values = midspan_clearance.Split('-');
Data = "Clearance " + values[0] + "\'-" + values[1] + "\"";
return [Link]();
}
lines++;
}
return [Link]();
}
catch (Exception Ex)
{
[Link](Ex + "");
return Data;
}
}
}
public double GSLat { get => Lat; set => Lat = value; }
public double GSLon { get => Lon; set => Lon = value; }
var ed = [Link];
var db = [Link];
return p;
}
[Link]();
return outPt;
}
}
Lat1 *= deg2radMultiplier;
lon1 *= deg2radMultiplier;
Lat2 *= deg2radMultiplier;
lon2 *= deg2radMultiplier;
return (distance);
}
if (bulge != 0.0)
{
double[] datas = GetArcGeom(pl, bulge, 0, 1);
area = datas[0];
cen = new Point2d(datas[1], datas[2]) * datas[0];
}
for (int i = 1; i < last; i++)
{
tmpArea = TriangleAlgebricArea(p0, pl.GetPoint2dAt(i),
pl.GetPoint2dAt(i + 1));
tmpPoint = TriangleCentroid(p0, pl.GetPoint2dAt(i),
pl.GetPoint2dAt(i + 1));
cen += (tmpPoint * tmpArea).GetAsVector();
area += tmpArea;
bulge = [Link](i);
if (bulge != 0.0)
{
double[] datas = GetArcGeom(pl, bulge, i, i + 1);
area += datas[0];
cen += new Vector2d(datas[1], datas[2]) * datas[0];
}
}
bulge = [Link](last);
if (bulge != 0.0)
{
double[] datas = GetArcGeom(pl, bulge, last, 0);
area += datas[0];
cen += new Vector2d(datas[1], datas[2]) * datas[0];
}
cen = [Link](area);
Point3d result = new Point3d(cen.X, cen.Y, [Link]);
return [Link]([Link]([Link]));
}
try
{
var reader = new StreamReader(SF);
int lines = 0;
while (![Link])
{
string line = [Link]();
string[] values = [Link](',');
if (lines == 0)
for (int c = 0; c < [Link]; c++)
if (values[c] == "station_reference")
station_referenceP = c;
else if (values[c] == "sta")
staP = c;
if (lines == P && P != 0)
{
station_reference = values[station_referenceP];
sta = values[staP];
Data = (station_reference + "\n" + sta).ToString();
return [Link]();
}
lines++;
}
return [Link]();
}
catch (Exception Ex)
{
[Link](Ex + "");
return Data;
}
}
}
// Start a transaction
using (Transaction acTrans = [Link]())
{
// Open the Layer table for read
LayerTable acLyrTbl;
acLyrTbl = [Link]([Link], [Link]) as
LayerTable;
foreach (ObjectId acObjId in acLyrTbl)
{
LayerTableRecord acLyrTblRec;
acLyrTblRec = [Link](acObjId, [Link]) as
LayerTableRecord;
[Link]([Link]);
}
}
// Start a transaction
using (Transaction acTrans = [Link]())
{
// Open the Layer table for read
LayerTable acLyrTbl;
acLyrTbl = [Link]([Link], [Link]) as
LayerTable;
foreach (ObjectId acObjId in acLyrTbl)
{
LayerTableRecord acLyrTblRec;
acLyrTblRec = [Link](acObjId, [Link]) as
LayerTableRecord;
[Link]([Link]);
}
}
[Link]();
return Layers;
}
return [Link];
}
}
}
// Start a transaction
using (Transaction acTrans =
[Link]())
{
// Open the Layer table for read
BlockTable table =
(BlockTable)[Link]([Link], [Link]);
[Link]();
// Start a transaction
using (Transaction acTrans =
[Link]())
{
// Open the Layer table for read
BlockTable table =
(BlockTable)[Link]([Link], [Link]);
[Link]();
return Blocks;
}
[Link](headers);
[Link](headers);
[Link] = "latitude";
[Link] = "longitude";
}
catch (Exception)
{
[Link]("Close file and try");
[Link] = "";
}
}
}
}
string s;
using (var reader = new StreamReader([Link]))
{
while (![Link])
{
s = [Link]();
if ([Link]("<coordinates>"))
{
string info = getBetween(s, "<coordinates>",
"</coordinates>");
acBlkTbl = [Link]([Link],
[Link]) as BlockTable;
acBlkTblRec =
[Link](acBlkTbl[[Link]], [Link]) as
BlockTableRecord;
using (Polyline acPoly = new Polyline())
{
[Link] = "ROW";
TempArrayData = j[0].Split(',');
[Link](TempArrayData[0]);
[Link](TempArrayData[1]);
int p = 0;
[Link]([Link], new
Point2d([Link](Point).X, [Link](Point).Y), 0, 0, 0);
}
[Link](acPoly);
[Link](acPoly, true);
[Link] = true;
}
}
}
}
[Link]();
[Link]();
}
[Link]();
[Link]("Draw Complete");
}
pbm = 0;
var Dm = [Link];
Database Db = [Link];
BlockTableRecord acBlkTblRec;
acBlkTblRec =
[Link](acBlkTbl[[Link]], [Link]) as
BlockTableRecord;
int NLines = 0;
while (![Link])
{
acPoly = new Polyline();
string Data = [Link]();
pbm++;
NLines++;
}
NLines = 1;
while (![Link])
{
acPoly = new Polyline();
if ([Link] == minddis)
{
Lines[0] = new Polyline();
Lines[0] = acPoly;
}
else
{
Lines[NLines] = new Polyline();
Lines[NLines] = acPoly;
NLines++;
}
}
}
catch (Exception ex)
{
[Link]([Link]());
}
}
while (!Fin)
{
try
{
Lines[0].JoinEntity(Lines[Poliline]);
//OffSet(Lines[Poliline], BRP, acTrans, acBlkTblRec,
minddis, OLines);
if (Poliline == NLines - 1)
Fin = true;
}
Fin = false;
while (!Fin)
{
try
{
Lines[0].JoinEntity(Lines[Poliline]);
//OffSet(Lines[Poliline], BRP, acTrans, acBlkTblRec,
minddis, OLines);
}
catch (Exception)
{
}
finally
{
Poliline--;
}
if (Poliline == 0)
Fin = true;
}
[Link](Lines[0]);
[Link](Lines[0], true);
[Link]();
}
[Link]("Drawing Complete");
}
double min;
Point3d Sp = [Link];
Point3d Ep = [Link];
[Link]([Link], new
Point2d([Link].X, [Link].Y), 0, 0, 0);
[Link]([Link], new
Point2d([Link](Ep, false).X, [Link](Ep, false).Y), 0,
0, 0);
[Link](PL);
[Link](PL, true);
[Link](PL);
}
}
catch (Exception ex)
{
[Link]([Link]());
}
}
public CParcel()
{
Line L;
//max = 1000;
min = 1000;
public CCable()
{
public CHH()
{
}
}
class CDatabase
{
//Local Database
static SQLiteConnection conn;
static SQLiteDataReader dr;
static SQLiteCommand cmd;
static [Link] dt;
public string DataSource = (@"C:\GenXCTool\DB\Plannin");
public CDatabase()
{
}
[Link]();
}
[Link]();
}
[Link]();
dt = new [Link]();
[Link](dr);
[Link]();
return dt;
}
public Boolean Existe(string commd)
{
try
{
int q = 0;
conect();
cmd = new SQLiteCommand(commd, conn);
dr = [Link]();
while ([Link]())
{
q++;
}
if (q == 0)
return false;
else
return true;
}
return false;
}
finally
{
[Link]();
}
}
}
}
public static void Ds(string Ds)
{
DataSource = Ds;
}
try
{
Conectar(DataSource);
Com = new SQLiteCommand(query, Con);
Dr = [Link]();
while ([Link]())
{
Dat = (byte[])Dr[0];
}
}
catch (Exception Ex)
{
[Link]("Error al Conectar en la base de datos= " +
[Link]());
}
finally
{
[Link]();
}
return Dat;
}
public void GuardarFoto(byte[] B)
{
try
{
Conectar(DataSource);
Com = new SQLiteCommand("Insert into Imagen Values(@imagen)", Con);
[Link]("@imagen", B);
[Link]();
[Link]("Cambios guardados Correctamente", "Guardar",
[Link], [Link]);
}
catch (Exception Ex)
{
[Link]("Error al guardar en la base de datos= " +
[Link]());
}
finally
{
[Link]();
}
}
#endregion
public SQLiteCommand select(string query, string DataSource)
{
try
{
Conectar(DataSource);
Com = new SQLiteCommand(query, Con);
[Link]();
}
catch (Exception Ex)
{
[Link]("Error al guardar en la base de datos= " +
[Link]());
}
finally
{
//[Link]();
}
return Com;
}
return dt;
}
class CPolyline
{
public static void Lin2Pol(Polyline Pl, Line L)
{
[Link]([Link], (new Point2d([Link].X,
[Link].Y)), 0, 0, 0);
[Link] = [Link];
}
}
class CLayout
{
CBlock cBlock = new CBlock();
int ViewportN = 0;
while (J)
{
PromptSelectionOptions promptPointOptions = new
PromptSelectionOptions();
[Link] = ("Select Cable");
PromptSelectionResult selectLinesFollow =
[Link](promptPointOptions);
if ([Link] == [Link])
{
foreach (ObjectId Obj in
[Link]())
{
DBObject entity = [Link](Obj,
[Link]);
if (entity is Polyline)
{
Polyline Pl = (Polyline)entity;
double Cont = 0;
PromptSelectionResult selectLinesFollow3 =
[Link]();
if ([Link] == [Link])
{
foreach (ObjectId Obj3 in
[Link]())
{
DBObject entity3 =
[Link](Obj3, [Link]);
if (entity3 is BlockReference)
{
BlockReference Br =
(BlockReference)entity3;
if (name == "Vport")
{
Point3dCollection AB = new
Point3dCollection();
DBObjectCollection dBObjectCollection =
new DBObjectCollection();
[Link](dBObjectCollection);
foreach (DBObject Db in
dBObjectCollection)
{
if (Db is Polyline)
{
Polyline Tpl = (Polyline)Db;
[Link](Pl,
[Link], AB, [Link], [Link]);
if ([Link] > 0)
{
foreach (Point3d P in AB)
{
if
([Link](P) > Cont)
{
Cont =
[Link](P);
}
}
}
}
}
ViewportN = ViewportN + 1;
BlockReference Br = new
BlockReference([Link](Cont), ObjId);
[Link] = "Vport";
double RealAngle = 0;
RealAngle = [Link];
if(Typ == "360")
{
[Link] = RealAngle;
}
if(Typ == "0_90")
{
if (RealAngle >= 0 && RealAngle <=
[Link] / 180 * 45)
{
[Link] = 0;
}
[Link](DbObjCol);
double Hi =
[Link](2) - [Link](1);
double Le =
[Link](1);
[Link] = "Vport";
[Link] = 0;
[Link](Br, true);
[Link](dBObjectCollection);
[Link](Pl,
[Link], AB, [Link], [Link]);
if ([Link] > 0)
{
List<Point3d> LIP = new
List<Point3d>();
if ())
{
[Link]([Link]());
}
else
{
Cont += Cont;
}
if (LengF)
Cont += [Link];
}
}
}
}
}
else
{
J = false;
}
J = false;
}
}
while(Layn)
{
BlockReference Used_Vport = Get_Used_Vport(Trans, LVp);
if(Layn)
{
Create_Layout(Trans, Used_Vport);
SetLayoutOrder(Trans);
Create_Cover(Trans, Page);
Create_North(Trans, Used_Vport);
}
}
}
if ([Link](Br) == "Vport")
[Link](entityp as BlockReference);
}
}
}
return LViewPort;
}
[Link](DB02);
Point3d Pc_Polyline_viewport =
[Link](Tpol);
return Used_Vport;
}
Used_Vport.Explode(DBOC);
[Link]("TILEMODE", 0);
[Link]();
if ([Link](Page))
{
[Link](Page);
}
[Link]();
[Link](plSet);
}
}
[Link] = 13.3000;
[Link] = 8.3000;
[Link] = PC2d;
[Link] = true;
}
Trans.Start_Trans();
[Link] = "Model";
List<Polyline> LRutes = new List<Polyline>();
Used_Vport.Explode(DB0);
[Link](Tpol.GetPoint3dAt(0));
VpPolyOri = Tpol;
}
}
PromptSelectionResult selectLinesFollow =
[Link](P3dc);
if ([Link] == [Link])
{
[Link]("TILEMODE", 0);
[Link]();
[Link] = Page;
if (entityp is Polyline)
{
Polyline polyline = (Polyline)entityp;
if ([Link] > 0)
{
foreach (Point3d item in intersectionPoints)
{
[Link](item);
}
[Link](polyline);
}
[Link](polyline);
}
}
}
double Max = 0;
[Link](Pd3);
}
}
[Link](dBObjectCollection);
if ([Link] > 0)
{
[Link](Br);
}
}
}
}
//[Link]("New Cable");
BlockReference Tembr;
[Link](dBObjectCollection);
if ([Link] > 0)
{
foreach (Point3d P3f in
intersectionPoints)
{
if (new Line(point3D, P3f).Length <
Dist)
{
Dist = new Line(point3D,
P3f).Length;
[Link](dBObjectCollection);
if ([Link] > 0)
{
foreach (Point3d P3f in
intersectionPoints)
{
if (new Line(point3D, P3f).Length
== Dist)
{
[Link](Br);
//[Link]([Link]);
}
}
}
}
}
}
}
}
}
//rectangulo
ObjectId Obj_Id = [Link]["vPORT2"];
[Link] = "Vport2";
BlockTableRecord Btr =
(BlockTableRecord)[Link]["vPORT2"].GetObject([Link]);
[Link](dBObjectCollection);
//Matchlines
if
([Link]([Link](cPoint.Regla_3(VpPolyOri, Dest, P),
false)) < [Link](1))
{
Der = true;
}
else if
([Link]([Link](cPoint.Regla_3(VpPolyOri, Dest, P),
false)) < [Link](2))
{
Der = true;
}
if (Der)
BlockName = "MatchLine2";
if
([Link]([Link]([Link], false)) <
[Link](1))
{
[Link] = [Link] / 180 * 0;
//[Link](([Link] / [Link] *
180).ToString());
}
else if
([Link]([Link]([Link], false)) <
[Link](2))
{
[Link] = [Link] / 180 * 270;
//[Link](([Link] / [Link] *
180).ToString());
}
else if
([Link]([Link]([Link], false)) <
[Link](3))
{
[Link] = [Link] / 180 * 0;
//[Link](([Link] / [Link] *
180).ToString());
}
else
{
[Link] = [Link] / 180 * 270;
// [Link](([Link] / [Link] *
180).ToString());
}
string Pag = "";
if ()
{
BlockTable blockTable =
[Link]([Link], [Link]) as
BlockTable;
BlockTableRecord blkTbRecPaper =
[Link](blockTable[[Link]],
[Link]) as BlockTableRecord;
[Link](Br);
BlockTableRecord Btr =
(BlockTableRecord)blockTable[BlockName].GetObject([Link]);
[Link](attDef, [Link]);
[Link] = true;
[Link](attRef);
[Link](attRef, true);
if ([Link] ==
"DESCRIPTION")
{
[Link] = "SEE
DRAWING# ";
}
else if ([Link] == "PAGE"
|| [Link] == "REF#")
{
[Link] = Pag;
}
else
{
[Link] = "";
}
}
}
}
DynamicBlockReferencePropertyCollection
pcFST = [Link];
foreach (DynamicBlockReferenceProperty dP
in pcFST)
{
if ([Link] == "Flip state1")
{
/* [Link](
$"\nName: {[Link]} " +
$"Type code: {[Link]}
" +
$"Unit type: {[Link]} " +
$"Allowed values: [{[Link](",
", [Link]())}]");*/
//[Link] = "1";
}
}
if (Del)
{
[Link]();
}
[Link](Pag);
}
}
}
}
}
}
}
}
Trans.Start_Trans();
[Link] = "Vport2";
DynamicBlockReferencePropertyCollection DBRC =
[Link];
[Link](Br, false);
}
Trans.Start_Trans();
[Link] = "Model";
if (DbObj is BlockReference)
{
BlockReference Br = DbObj as BlockReference;
//[Link](Li, true);
// [Link](PLC, true);
[Link]("TILEMODE", 0);
[Link]();
[Link] = Page;
Layout Aclayout =
[Link]([Link]([Link]),
[Link]) as Layout;
[Link](acVport, false);
[Link] = true;
[Link] = "Model";
}
var modelPt2 =
[Link](([Link](Pl.GetPoint3dAt(3)) + [Link]) / 2);
C = new Circle();
[Link] = 15;
[Link] = modelPt2;
//[Link](C, true);
modelPt1 =
[Link]([Link]);
modelPt2 =
[Link]([Link]);
C = new Circle();
[Link] = 15;
[Link] = [Link](Pl);
//[Link](C, true);
// [Link]();
var paperPt2 = new Point3d(1.2694, 6.1092, 0);
C = new Circle();
[Link] = 2;
[Link] = paperPt2;
//[Link](C, false);
paperPt1 =
[Link]([Link]);
paperPt2 =
[Link]([Link]);
//[Link]();
}
[Link]();
}
}
var modelPt1 =
[Link]([Link](Pl.GetPoint3dAt(3)) + ([Link] -
[Link](Pl.GetPoint3dAt(3))) / 2);
//[Link] += [Link]() + "\n";
var modelPt2 =
[Link]([Link](Pl.GetPoint3dAt(1)) +
([Link](Pl.GetPoint3dAt(2)) - [Link](Pl.GetPoint3dAt(1))) /
2);
//[Link] += [Link]() + "\n";
modelPt1 =
[Link]([Link]);
modelPt2 =
[Link]([Link]);
[Link]();
//Verify Points
{
Circle C = new Circle
{
Center = modelPt1,
Radius = 5
};
// [Link](C, true);
C = new Circle
{
Center = modelPt2,
Radius = 5
};
// [Link](C, true);
C = new Circle
{
Center = paperPt1,
Radius = 1
};
// [Link](C, false);
C = new Circle
{
Center = paperPt2,
Radius = 1
};
// [Link](C, false);
}
paperPt1 =
[Link]([Link]);
paperPt2 =
[Link]([Link]);
modelPt1 =
[Link]([Link]);
modelPt2 =
[Link]([Link]);
[Link]();
//Verify Points
{
Circle C = new Circle
{
Center = modelPt1,
Radius = 5
};
// [Link](C, true);
C = new Circle
{
Center = modelPt2,
Radius = 5
};
// [Link](C, true);
C = new Circle
{
Center = paperPt1,
Radius = 1
};
// [Link](C, false);
C = new Circle
{
Center = paperPt2,
Radius = 1
};
// [Link](C, false);
}
paperPt1 =
[Link]([Link]);
paperPt2 =
[Link]([Link]);
//[Link]([Link]());
modelPt1 =
[Link]([Link]);
modelPt2 =
[Link]([Link]);
[Link]();
paperPt1 =
[Link]([Link]);
paperPt2 =
[Link]([Link]);
[Link]();
}
}
}
}
else
{
vp = (Viewport)[Link]([Link],
[Link]);
[Link]();
paperPt1 =
[Link]([Link]);
paperPt2 =
[Link]([Link]);
[Link]();
[Link]();
}
//[Link]();
}
[Link] = locked;
}
Point3dCollection P3dc;
PromptPointOptions promptPointOptions = new
PromptPointOptions("Point");
PromptPointResult selectStartPoint =
[Link](promptPointOptions);
if ([Link] == [Link])
{
P3d = [Link];
}
else
{
Layn = false;
}
if (Layn)
{
PromptSelectionResult selectLinesFollow = [Link]();
if ([Link] == [Link])
{
foreach (ObjectId objectid in
[Link]())
{
DBObject entityp = [Link](objectid,
[Link]);
if (entityp is BlockReference)
{
BlockReference Br = (BlockReference)entityp;
name = [Link] ?
((BlockTableRecord)[Link]([Link])).Name :
[Link];
if (name == "Vport")
[Link](entityp as BlockReference);
}
}
}
[Link](DB0);
Point3d Pc_Polyline_viewport =
[Link](Tpol);
{
P3dc = new Point3dCollection();
Used_Vport.Explode(DB0);
[Link](Tpol.GetPoint3dAt(0));
}
}
//[Link](PLC, true);
Used_Vport.Explode(collection);
int CabCon = 1;
int Hhcon = 0;
double MaxX = 0;
double MinX = 0;
double MaxY = 0;
double MinY = 0;
double MaxWidth = 0;
//Polyline VpPolyDes;
PromptSelectionResult selectLinesFollow =
[Link](P3dc);
if ([Link] == [Link])
{
PromptSelectionResult selectLines = [Link]();
if ([Link] == [Link])
{
foreach (ObjectId objectid in [Link]())
{
DBObject entityp = [Link](objectid,
[Link]);
if (entityp is BlockReference)
{
BlockReference Br = (BlockReference)entityp;
if (name == "Vport")
{
[Link](Br);
}
}
}
}
[Link]("TILEMODE", 0);
[Link]();
if ([Link](Page))
{
[Link](Page);
}
[Link](plSet);
}
}
// Set the layout current if it is not already
[Link] = Page;
//[Link] = PC2d;
[Link] = new Point3d(10.2319, 7.7190, 0);
//[Link] = StandardScaleType.Scale1To8inchAnd1ft;
//
[Link] = 9;
[Link] = 7;
//[Link]([Link]());
[Link] = PC2d;
[Link] = true;
//freezing los layer dentro del viewport
ObjectIdCollection Layers = new ObjectIdCollection();
ObjectIdCollection Layers2 = new ObjectIdCollection();
LayerTable acLyrTbl;
acLyrTbl =
[Link]([Link], [Link]) as
LayerTable;
foreach (ObjectId acObjId in acLyrTbl)
{
LayerTableRecord acLyrTblRec;
acLyrTblRec = [Link](acObjId,
[Link]) as LayerTableRecord;
////cover
ObjectId Obj_Id = [Link]["AT&T_COVER"];
[Link] = "Vport2";
DynamicBlockReferencePropertyCollection DBRC =
[Link];
BlockTable blockTable =
[Link]([Link], [Link]) as
BlockTable;
BlockTableRecord blkTbRecPaper =
[Link](blockTable[[Link]],
[Link]) as BlockTableRecord;
[Link](Br);
BlockTableRecord Btr =
(BlockTableRecord)blockTable["AT&T_COVER"].GetObject([Link]);
[Link](attRef);
[Link](attRef, true);
}
}
}
}
}
////datos
Obj_Id = [Link]["BURIED STAMP"];
[Link] = "Vport2";
DynamicBlockReferencePropertyCollection DBRC =
[Link];
BlockTable blockTable =
[Link]([Link], [Link]) as
BlockTable;
BlockTableRecord blkTbRecPaper =
[Link](blockTable[[Link]],
[Link]) as BlockTableRecord;
[Link](Br);
[Link](attRef);
[Link](attRef, true);
[Link] = Page;
}
}
}
}
}
////detalles
Obj_Id = [Link]["Placement_Detail"];
[Link] = "Vport2";
BlockTable blockTable =
[Link]([Link], [Link]) as
BlockTable;
BlockTableRecord blkTbRecPaper =
[Link](blockTable[[Link]],
[Link]) as BlockTableRecord;
[Link](Br);
BlockTableRecord Btr =
(BlockTableRecord)blockTable["Placement_Detail"].GetObject([Link]);
[Link] = true;
[Link](attRef);
[Link](attRef, true);
[Link] = "";
}
}
}
}
}
//rectangulo
Obj_Id = [Link]["vPORT2"];
[Link] = "Vport2";
BlockTable blockTable =
[Link]([Link], [Link]) as
BlockTable;
BlockTableRecord blkTbRecPaper =
[Link](blockTable[[Link]],
[Link]) as BlockTableRecord;
[Link](Br);
BlockTableRecord Btr =
(BlockTableRecord)blockTable["vPORT2"].GetObject([Link]);
[Link] = true;
[Link](attRef);
[Link](attRef, true);
}
}
}
[Link](dBObjectCollection);
double Max = 0;
[Link](Pd3);
}
}
[Link](dBObjectCollection);
if ([Link] > 0)
{
[Link](Br);
}
}
}
}
//[Link]("New Cable");
[Link](dBObjectCollection);
if ([Link] > 0)
{
foreach (Point3d P3f in
intersectionPoints)
{
if (new Line(point3D, P3f).Length <
Dist)
{
Dist = new Line(point3D,
P3f).Length;
//
[Link]([Link]() + "\n" +PaGe);
}
}
}
}
}
}
}
}
}
[Link](dBObjectCollection);
if ([Link] > 0)
{
foreach (Point3d P3f in
intersectionPoints)
{
if (new Line(point3D, P3f).Length
== Dist)
{
[Link](Br);
//[Link]([Link]);
}
}
}
}
}
}
}
}
}
if
([Link]([Link](Poi.Regla_3(VpPolyOri, Dest, P),
false)) < [Link](1))
{
Der = true;
}
else if
([Link]([Link](Poi.Regla_3(VpPolyOri, Dest, P),
false)) < [Link](2))
{
Der = true;
}
if (Der)
BlockName = "MatchLine2";
//[Link](([Link] / [Link] *
180).ToString());
}
else if
([Link]([Link]([Link], false)) <
[Link](2))
{
[Link] = [Link] / 180 * 270;
//[Link] = new Point3d([Link].X +
0.1463, [Link].Y, 0);
//[Link](([Link] / [Link] *
180).ToString());
}
else if
([Link]([Link]([Link], false)) <
[Link](3))
{
[Link] = [Link] / 180 * 0;
//[Link](([Link] / [Link] *
180).ToString());
}
else
{
[Link] = [Link] / 180 * 270;
if ()
{
BlockTable blockTable =
[Link]([Link], [Link]) as
BlockTable;
BlockTableRecord blkTbRecPaper =
[Link](blockTable[[Link]],
[Link]) as BlockTableRecord;
[Link](Br);
BlockTableRecord Btr =
(BlockTableRecord)blockTable[BlockName].GetObject([Link]);
[Link](attDef, [Link]);
[Link] = true;
[Link](attRef);
[Link](attRef, true);
if ([Link] ==
"DESCRIPTION")
{
[Link] = "SEE
PAGE# ";
}
else if ([Link] == "PAGE"
|| [Link] == "REF#")
{
[Link] = Pag;
}
else
{
[Link] = "";
}
}
}
}
DynamicBlockReferencePropertyCollection
pcFST = [Link];
foreach (DynamicBlockReferenceProperty dP
in pcFST)
{
if ([Link] == "Flip state1")
{
/* [Link](
$"\nName: {[Link]} " +
$"Type code: {[Link]}
" +
$"Unit type: {[Link]} " +
$"Allowed values: [{[Link](",
", [Link]())}]");*/
//[Link] = "1";
}
}
if (Del)
{
[Link]();
}
[Link](Pag);
}
}
}
}
}
}
////set vecinos
// Get the current layout and output its name in the Command Line
window
Layout acLayout =
[Link]([Link]([Link]),
[Link]) as Layout;
DBDictionary acPlSet =
[Link]([Link],
[Link]) as
DBDictionary;
[Link]();
//[Link]();
SpaceAlign2(PLC);
[Link] = "Model";
}
class CStreet
{
public void AddCl(CTransaction Trans)
{
WebClient Client = new WebClient();
GeoLocationData geo =
[Link]([Link], [Link]) as
GeoLocationData;
//[Link]([Link]([Link]).ToString());
//[Link]([Link]([Link]).ToString());
[Link]([Link]([Link]).Y);
[Link]([Link]([Link]).Y);
string LongMin = [Link]().ToString("0.000");
string LatMin = [Link]().ToString("0.000");
string LongMax = [Link]().ToString("0.000");
string LatMax = [Link]().ToString("0.000");
if ([Link](@"C:\GenXCTool\Temp Arc\[Link]"))
{
[Link](@"C:\GenXCTool\Temp Arc\[Link]");
}
[Link](@"C:\GenXCTool\Temp Arc\[Link]",
[Link]("[Link] + LongMin +
"," + LatMin + "," + LongMax + "," + LatMax));
XmlDocument XDoc = new XmlDocument();
[Link](@"C:\GenXCTool\Temp Arc\[Link]");
XmlNodeList xnNode = [Link]("node");
XmlNodeList xnWay = [Link]("way");
List<string> way = new List<string>();
string[] highway = new string[] { "motorway", "trunk",
"primary", "secondary", "tertiary", "unclassified", "residential", "road" };
bool flag = false;
bool flag0 = false;
foreach (XmlNode xWay in xnWay)
{
}
}
flag = false;
flag0 = false;
foreach (XmlNode xWayNode in xWay)
{
if ([Link] == "nd")
{
[Link]([Link][0].Value);
}
if ([Link] == "tag")
{
}
if ([Link][0].Value ==
"tiger:name_base")
{
Base = [Link][1].Value;
}
if ([Link][0].Value ==
"tiger:name_type")
{
sux = [Link][1].Value;
}
if (xWayNode ==
[Link][[Link] - 1])
{
flag0 = true;
}
}
}
if (flag2)
{
if ([Link] == "lon")
{
lon =
[Link]([Link]);
}
if ([Link] == "lat")
{
lat =
[Link]([Link]);
}
}
if (flag2)
{
//[Link]([Link]()+","+[Link]());
[Link]([Link], new
Point2d([Link](new Point3d(lon, lat, 0)).X,
[Link](new Point3d(lon, lat, 0)).Y), 0, 0, 0);
}
[Link](pl, true);
[Link](pl, Name, EOP, "");
//[Link]([Link](),Name, [Link][0].Name,
[Link][0].SubLocation);
[Link] = "Streets";
}
}
}
}
}