Results 1 to 2 of 2

Thread: Civil3D: Erase sites

  1. #1
    Join Date
    Login to Give a bone

    Default Civil3D: Erase sites

    I'm desperate at the following task and hope that someone has an idea.
    It looks easy - erase a site. But in contrast to e.g. corridors this code does not work:

    Dim C3d_Trans As Transaction = Acad_Database.TransactionManager.StartTransaction()
    Dim C3d_SiteId As ObjectId = Autodesk.Civil.DatabaseServices.Site.Create(C3d_ActiveDoc, "X")
    Dim C3d_SiteObject As Site = C3d_Trans.GetObject(C3d_SiteId, Autodesk.AutoCAD.DatabaseServices.OpenMode.ForWrite)

    Error message "eNotApplicable".

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    Login to Give a bone

    Default Re: Civil3D: Erase sites

    Have you considered iterating the Sites Collection from the AeccXUiLand.AeccApplication Object, then invoking the Sites Remove() Method, supplying the individual Site as parameter?

    There's a Visual LISP variation of this concept in this old thread:

    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

Similar Threads

  1. 2014: Something I can't see and can't erase,,,
    By boyerd492098 in forum AutoCAD General
    Replies: 6
    Last Post: 2015-08-28, 01:36 AM
  2. Saveas/Export to Civil3D 2010 from Civil3D 2011
    By Openwheeler in forum AutoCAD Civil 3D - General
    Replies: 9
    Last Post: 2011-07-06, 04:00 PM
  3. Erase outside the Box
    By jseamons in forum AutoLISP
    Replies: 6
    Last Post: 2006-09-07, 11:19 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts