Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Removing profile PVIs not working

2 REPLIES 2
Reply
Message 1 of 3
JamesMaeding
329 Views, 2 Replies

Removing profile PVIs not working

I am trying to clear out all pvis in a profile, code is:

while (profUse.PVIs.Count > 0) {
  profUse.PVIs.RemoveAt(profUse.PVIs.Count - 1);
}

 seems like its the right approach, you cannot set the pvis collection to a new collection.

It catches every time though, does not matter how many pvis in the profile.

Seems I need some education on what you are alowed to do with pvi collections.

thx

 


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

2 REPLIES 2
Message 2 of 3
Jeff_M
in reply to: JamesMaeding

I think that you cannot delete the first or last PVI, as a profile must contain at least 2. Not in a position to do any checking right now, though.

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 3
JamesMaeding
in reply to: Jeff_M

seems my old com code just deleted and added back to avoid the Autodesk imposed rules.

That worked with .net too.


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report