Hello Everyone,
I am working with a VBA that will add a link to an element, but I would like to have the option to edit the link once I have added it to an element. For instance, I would like to be able to select an element, run my VBA, and then have the Edit Link window appear (see following picture).
Here is my VBA so far:
Sub Macro1() Dim startPoint As Point3d Dim point As Point3d, point2 As Point3d Dim lngTemp As Long
' Start a command CadInputQueue.SendKeyin "ELEMENT CREATE LINK URL http://www.google.com"
CommandState.StartDefaultCommandEnd Sub
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jeff,
as I wrote in my previous answer to another your question, there is no public Project Explorer VBA API, so any access to Project Explorer functionality (including links) is not straightforward or even not possible. Based on the situation I quite sure there is no way how to edit link from VBA.
If one link only is attached to an element, you can use key-in links edit in such workflow:
If you will record edit link tool using macro recorder, you will see the key-in links edit has some parameters, so it seems like it's possible to use the key-in without selecting the element in advance, but the parameters are not documented and they don't work if used from command line.
With regards,
Jan