Hello,
I would like to automate itemtype property assignment.
To do that, I'm trying to write a small piece of VBA but it seems no functions are available for this usage in the VBA API.
As an old Microstation user, I know we can replace some piece of code by key-ins in many case. I'm going to the macro recorder to see which key-ins I must use and I have something like this :
Sub BmrITEMTYPE()
Dim point As Point3d
CadInputQueue.SendKeyin "MDL KEYIN Bentley.CustomProperties, Bentley.CustomProperties ITEMTYPE ATTACH"
CadInputQueue.SendKeyin "ITEMTYPE SETTINGS DESELECTALL "
CadInputQueue.SendKeyin "ITEMTYPE SETTINGS SELECT Architectural\Stairs"
' Les coordonnées sont en unités principales
point.X = 0.0
point.Y = 0.0
point.Z = 0.0
' Envoyer un point données à la commande actuelle
CadInputQueue.SendDataPoint point, 1
CadInputQueue.SendKeyin "ITEMTYPE SETTINGS DESELECTALL "
CadInputQueue.SendKeyin "ITEMTYPE SETTINGS SELECT Architectural\Stairs"
CadInputQueue.SendKeyin "ITEMTYPE SETTINGS SETVALUE Type abc"
' Envoyer une réinit à la commande actuelle
CadInputQueue.SendReset
CommandState.StartDefaultCommand
End Sub
This macro works on the selected element and the itemtype Architectural\Stairs is correctly attached BUT the value "abc" is not set to the "Type" property.
I have tried manually and it's exactly the same : the property is not modified!
Anybody have an idea to solve this ?
Many thanks in advance !
Philippe