Excel to Microstation Connect - VBA - Lesson 6 - Adding Multiline from Excel

preview_player
Показать описание
This code covers adding multiline from xl to microsation using vba

---------------------------------------------------------------
Sub multilinetext()

'Define variables
Dim myMSAppCon As MicroStationDGN.ApplicationObjectConnector
Dim mymsapp As MicroStationDGN.Application
Dim mytextnode As TextNodeElement
Dim OriginPoint As Point3d
Dim Rotmatrix As Matrix3d

'Dim myExcel As Excel.Application
Dim mysheet As Worksheet

ActiveSettings.TextStyle.NodeLineSpacing = 1

OriginPoint.x = 0: OriginPoint.Y = 0: OriginPoint.Z = 0

Set mytextnode = CreateTextNodeElement1(Nothing, OriginPoint, Rotmatrix)
mytextnode.AddTextLine "One"
mytextnode.AddTextLine "Two"
ActiveModelReference.AddElement mytextnode

End Sub

......................

Free music on the link below
Music: Glare On The Water by Vlad Gluschenko is licensed under a Creative Commons License.
Рекомендации по теме
Комментарии
Автор

Hi SM I have created a couple of Excel sheets but I need to add a few functionality in it and also to change the format of the sheet. Secondly, I also want to make it faster. Can you provide this as a service for me?

mjqazi
Автор

How could I also plot the point or place a cell instead of text at the coordinates?

joebloor
welcome to shbcf.ru