|
Hello,
I'm just about
developing an addin for rose and trying to implement the
following functionality:
In certain cases the
user is not allowed to create a new class (for example by clicking the
class icon in the toolbar and then in the diagram).
So I registered for
the NewModelElementEvent and try to delete the class
afterwards:
Public Sub
OnNewModelElement(objRoseApp As RoseApplication, objItem As
RoseItem)
...
If aktuelleAnsicht <> ANSICHT.MODELL Then Dim res As VbMsgBoxResult Dim aktModell As RoseModel res = MsgBox("...Message...", vbOKOnly, "Error") aktModell = objRoseApp.CurrentModel MsgBox "Name " + objItem.Name + aktModell.GetAllClasses.GetWithUniqueID(objItem.GetUniqueID).Name ' for debug purposes
aktModell.RootCategory.DeleteClass
(aktModell.GetAllClasses.GetWithUniqueID(objItem.GetUniqueID))
End If End Sub What happens is:
When I create a class (and the condition aktuelleAnsicht <> ANSICHT.MODELL
is true) the first msgbox appears but not the second one (the one beginning with
"Name").
So: If I have a
RoseItem that is a class, how can I delete it?
Thank you in
advance,
Alexander
|
- (ROSE) Rosescript - "read only" p... "G�ntsch, Alexander"
- (ROSE) Rosescript - "read only&qu... Dan Liu
- RE: (ROSE) Developing addins: Deleting... Hsia, John
- RE: (ROSE) Developing addins: Deleting... Hsia, John
