I would like to add text element in V8xm by Excel VBA. The following code usually alerted error '438'. Do you have any sample for adding element to microstation when used by excel vba ? Thank You!
Sub imporoMS()Dim myUstation As MicroStationDGN.ApplicationDim myDGN As DesignFileDim PnoCoord As Point3dDim placetext As TextElementSet myUstation = New MicroStationDGN.ApplicationmyUstation.Visible = falseSet myDGN = myUstation.OpenDesignFile("c:\temp\test1.dgn", False)PnoCoord.x = 80000#PnoCoord.Y = 80000#PnoCoord.Z = 0#
Set placetext = myUstation.CreateTextElement1(Nothing, "ImportfromExcel", PnoCoord, Matrix3dIdentity)myUstation.ActiveModelReference.AddElement (placetext)myUstation.QuitEnd Sub
kwhung
Microstation Version 08.09.04.51
myUstation.ActiveModelReference.AddElement (placetext)
The above line has the wrong syntax. Look at this web page for information about VBA procedure calling conventions.
Regards, Jon Summers LA Solutions