Author Topic: Civil 3D | Parcels  (Read 40257 times)

0 Members and 1 Guest are viewing this topic.

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: Civil 3D | Parcels
« Reply #30 on: November 25, 2014, 12:08:22 PM »
These phantom parcels are actually phantom sites. Most often created when importing Survey Figures. I have not found ANY way to remove them, be it lisp, .NET, hammer, prayer.

This has been an issue for years, not something that was just recently broken. The lisp that BB posted still does work in some cases, but not with these particular phantom objects.

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Civil 3D | Parcels
« Reply #31 on: November 25, 2014, 12:09:37 PM »
so his best path is NEW file>>Import Settings and Styles and move forward.

Thanks for that JeffM and BB.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

TonyatAlpha

  • Guest
Re: Civil 3D | Parcels
« Reply #32 on: November 25, 2014, 12:11:04 PM »
Thanks everyone, I was hoping it wouldn't come to that but I would rather do that than keep passing these objects to all our projects.

BlackBox

  • King Gator
  • Posts: 3770
Re: Civil 3D | Parcels
« Reply #33 on: November 25, 2014, 12:34:08 PM »
These phantom parcels are actually phantom sites. Most often created when importing Survey Figures. I have not found ANY way to remove them, be it lisp, .NET, hammer, prayer.

This has been an issue for years, not something that was just recently broken. The lisp that BB posted still does work in some cases, but not with these particular phantom objects.

The drawing I was sent offline actually does have phantom Parcels; you can select them, and apply a style that makes them display, but they cannot be Remove()-ed.  :| Grrr



Also worthy of note, is that both Sites and Parcels have an ObjectName of AcDbFace.

At least for the simplicity of some LISP sub-functions I have that can be used in concert with ODBX batch processing (for searching a directory of drawings for Sites, Parcels, etc. [I have others as well]), you can validate Sites by testing for an available Parcels Property (even if empty), whereas Parcels require testing the same AcDbFace for ParcelLoops Property availability.

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

cadhelp

  • Mosquito
  • Posts: 1
Re: Civil 3D | Parcels
« Reply #34 on: December 04, 2018, 06:40:34 PM »
I think I have figured it out. Reinserting same figures will disconnect old site and effectively make them "phantom". So all you need to do is to check the site area.

;;originated from
;;http://www.theswamp.org/index.php?topic=42585.msg477730#msg477730
;;by BlackBox
(defun c:AeccDeleteParcels ( / #ACAD# #ACADDOC# aeccDoc ss)
  (defun Civil-version ( / )
    (rtos(atof(vl-registry-read(strcat "HKEY_LOCAL_MACHINE\\"(vlax-user-product-key)) "Release"))2 1)
  )
  (defun Exitprompt ( msg / )(alert msg)(exit))
  (setq #ACAD# (vlax-get-acad-object))
  (setq #ACADDOC# (vla-get-activedocument #ACAD#))

  (setq ss(ssget "x" '((0 . "AECC_PARCEL"))))
  (if (not(setq aeccApp (vla-getInterfaceObject #ACAD# (strcat "AeccXUiLand.AeccApplication." (Civil-version)))))
    (exitprompt "Could not connect to AeccXUiLand.AeccApplication.")
  )
 
  (setq aeccDoc (vlax-get aeccApp 'ActiveDocument))
  (setq oSites (vlax-get aeccDoc 'sites))
  (vlax-for x (vla-get-activeselectionset #ACADDOC#)
    (if(=(vlax-get(vlax-get(vlax-get x 'Parcels)'Statistics)'Area)0)
       (vl-catch-all-apply 'vlax-invoke (list oSites 'remove x))
    )
  )
)


« Last Edit: December 04, 2018, 06:44:15 PM by cadhelp »