cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Diagram API - How to hide a path

dernadote
New Contributor

Hello,

Thanks to the VB script API, it is possible to hide an object in a diagram before saving it as a picture (I don't want to modify the diagram in the repository).

The same, it is possible to change links.

I found no way to hide a path.

Does anybody have a clue for that?

 

By the way, I tried removing the main object of the path from the diagram.

This is done thanks to the DrawingObject.DrawingItem.erase function.

But this remove effectively the object from the diagram.

I wrapped the code between a Enter/LeavePrivilege section and did a rollback before leaving so the removal is undone.

The concern is if the diagram is currently opened in the desktop the path is removed and not reset.

Is there a way to determine whether the diagram is opened or not?

 

Thanks for your help.

Dominique

1 Reply

gquiniou
Retired

I dont know any way to know if a diagram is open but you can hide a path in a diagram with the API:

 

For each di In drawing.DrawingItems

  If di.DrawClassName = "ModeDrwPath" Then
    di.ItemProperty("UserHidden") = True
  End If
Next