Author Topic: erase line/circle object  (Read 3220 times)

0 Members and 1 Guest are viewing this topic.

jcoon

  • Newt
  • Posts: 157
erase line/circle object
« on: September 13, 2013, 08:09:36 AM »
I need a link or description of why I'm getting an error trying to erase some lines and circles I've inserted into my dwg.

I've created the line by 3d points and it is placed in the dwg.
Dim objline1 As Line = New Line(newpt103, newpt106)
mytrans.AddNewlyCreatedDBObject(objline1,true)

next I created a circle

Dim circleObj1 As Circle = New Circle()
circleObj1.SetDatabaseDefaults()
circleObj1.Center = newpt101
circleObj1.Radius = 5000
circleObj1.Normal = Vector3d.ZAxis
acBlkTblRec.AppendEntity(circleObj1)
mytrans.AddNewlyCreatedDBObject(circleObj1,true)
Both object are inserted into the drawing and I use them in an intersection query, so these appear to be valid

I think the objects are defined correctly and insert in the database, however when I try to erase these items I get an eNODatabase error.

I used:

objline1.Erase(True)
circleObj1.Erase(True)

Thanks
John

BillZndl

  • Guest
Re: erase line/circle object
« Reply #1 on: September 13, 2013, 08:26:27 AM »
It may be a moot point but are you commiting the transaction after adding the circle/line to the database?

Gasty

  • Newt
  • Posts: 90
Re: erase line/circle object
« Reply #2 on: September 13, 2013, 09:24:39 AM »
Hi,

I think there is no need to add objects to the data base in order to test for intersections, just create the object in memory and do the tests, after finish the tests you should dispose the memory objects.

Gaston Nunez

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: erase line/circle object
« Reply #3 on: September 13, 2013, 09:48:03 AM »
Hi,

For geometry calculation, rather than create Database objects as Circle or Line which have to be disposed if not added to the Database, you'd use Geometry objects as Circulararc2d (3d) and Line2d (3d) or LineSegment2d (3d).
Speaking English as a French Frog

jcoon

  • Newt
  • Posts: 157
Re: erase line/circle object
« Reply #4 on: September 13, 2013, 11:23:41 AM »
so I need to look into Geometry objects. I was creating the objects in the drawing so I could check the line work generated. I need to check hundreds of offsets to the lines and circles to generate the final line. I had no idea about the difference between geometry objects and database objects. I'll spend some time looking into that.

Thank you,
John

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: erase line/circle object
« Reply #5 on: September 13, 2013, 11:59:49 AM »
Stupid question time: with that many checks, wouldn't it be better to derive a mathematical solution rather than a graphical one?
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

jcoon

  • Newt
  • Posts: 157
Re: erase line/circle object
« Reply #6 on: September 13, 2013, 12:46:44 PM »
I was able to get the same outcome without adding the objects to the database. thank you for that, that's great!


Derive a mathematical solution: If I could figure out how to come up with one based on the geometry I'm producing I would. I wouldn't have any idea how to come up a model to generate an airport airspace model configured for multiple approach dimension with multiple runways without building and checking the constructed civil 3D surface models built from checked line work controlled by multiple combo box selections.  I'm just not smart enough to come up with that.
I know how and what my desired surface models require after building them by hand for years. because of that I'm comfortable after checking all the outcomes hundreds of times based all different combinations, elevations, and rotations that I'm confident in my models because I checked them so many times.

I'm only looking to upgrade old VBA routine's to automate that task in VB. If I could find a application that did all that off the self under 20k we would of purchased it years ago.



 
John

owenwengerd

  • Bull Frog
  • Posts: 451
Re: erase line/circle object
« Reply #7 on: September 13, 2013, 01:18:10 PM »
If I could find a application that did all that off the self under 20k we would of purchased it years ago.

There are a lot of very talented programmers here at the swamp that could create a professional application to your specifications, probably for much less than 20k.

jcoon

  • Newt
  • Posts: 157
Re: erase line/circle object
« Reply #8 on: September 13, 2013, 03:34:28 PM »

I think there are looking for a commercial  version not just a professional application because of support and upgrades needed as FAA design codes change year after year.

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: erase line/circle object
« Reply #9 on: September 13, 2013, 06:32:05 PM »
You stated that you are checking circles and lines; the actual application doesn't matter.  It could be airports or spacecraft trajectories, but a line is a line, and intersecting lines and circles is almost as easy as lines and lines.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

jcoon

  • Newt
  • Posts: 157
Re: erase line/circle object
« Reply #10 on: September 14, 2013, 10:58:20 AM »
When I said I was checking lines,  I'm checking that the math/code that was used to get the intersection and other locations with the elevation applied from other sources are correct and that calls for point numbers were entered correctly. checking your work never hurts

John