This is in response to a request for the code. Written for C3D 2011. May need to change version.
Careful: this will remove ALL sites. The phantom parcels show up as "sites".
Dim AeccApp As AeccRoadwayApplication
Set AeccApp = ThisDrawing.Application.GetInterfaceObject("AeccXUiRoadway.AeccRoadwayApplication.8.0")
Dim si As AeccSite
Dim sis As AeccSites
Set sis = AeccApp.ActiveDocument.sites
For Each si In sis
sis.Remove (si.name)
Next
Just viewed the Parcel Class using IlSpy, and there are no Methods, Properties, etc. shown...That's because there is not much in the way of Parcel support in the .NET API. But, as you've partially found, there are quite a number of properties and methods exposed via the COM API.
Just an observation....when using the ActiveX API for C3D, you should try to keep the Application object limited to what you are doing. Parcels are a part of the Land library, so that is what should be accessed. This code works because (I think) the Roadway Application needs the Land Application so it gets loaded by default. But, by loading the Roadway Application, you introduce the overhead of having to load the Corridor objects unnecessarily. So replace "AeccXUiRoadway.AeccRoadwayApplication." with "AeccXUiLand.AeccApplication."
Just viewed the Parcel Class using IlSpy, and there are no Methods, Properties, etc. shown...That's because there is not much in the way of Parcel support in the .NET API. But, as you've partially found, there are quite a number of properties and methods exposed via the COM API.
If you still have that drawing with all the odd parcels in it, could I have a look at it?
adding ((vl-string-search "19.1" vrsn) "11.0") to the mix but that doesn't appear to do the trick.For 2014 use "10.3", not "11.0". For 2015 this will be "10.4"
adding ((vl-string-search "19.1" vrsn) "11.0") to the mix but that doesn't appear to do the trick.For 2014 use "10.3", not "11.0". For 2015 this will be "10.4"
... Am I missing something?
I know this is a month late, but I've just found these "ghost" parcels in my template drawing file and would like to find a way to get rid of them. I've tried using the lisp routine but it does not work.
Civil 3d 2014. I have attached my template file. There are 1853 "ghost" parcels in the file.
should i just grab all my styles and settings and start with a fresh drawing.
any help would be greatly appreciated
Civil 3D API: The parameter is incorrect.
...I see no ghosts...
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.