PDA

View Full Version : Problems about "ActiveDocument.ActiveView"



wenshin
2008-04-17, 08:34 AM
Hi,

i wonder that if i delete some elements in "commandData.Application.ActiveDocument.ActiveView.Elements", then those elements won't be displayed on screen?

And no matter how i passed the argument into "ActiveView.Elements.Erase()" or "ActiveView.Elements.Insert()",
there always have "stack overflow exception",

did anyone been success in using these two method?

Thank you in advance.

Rick

mmason.65315
2008-04-17, 12:18 PM
Are you trying to delete the elements? or just remove them from the view?

If you're trying to delete them, I'd stick with ActiveDocument.Delete( element ).

(also: wrap it in a transaction if you want the results to be visible while you're still in your application).

-Matt

wenshin
2008-04-17, 01:37 PM
Thank for your reply. :)

I just want to remove them from the view,

by passing a FamilyInstance element like column or beam into these two method,

I should be able to control the visibility of the elements,

but the problem of "stack overflow exception" have bothered me for a while,

so i wonder did anyone been success in using these two method?

Rick