I am trying to migrate from excel vba to libreoffice basic. where can I find example for controlling AutoCAD?
For example I would like to generate the LibreOffice equivalent of this VBA macro:
Also, How do I set references for Autodesk libray?
Public Sub AddMyTextHeight()
Dim ACAD As AcadApplication 'Create ACAD variable of type AcadApplication
On Error Resume Next 'This tells VBA to ignore errors
Set ACAD = GetObject(, "AutoCAD.Application") 'Get a running instance of the class AutoCAD.Application
Dim textObj As AcadText
Dim insertionPoint(0 To 2) As Double
Dim height As Double
height = 0.5
xx=5
yy=7
textString="aaaa"
insertionPoint(0) = xx + 0.2
insertionPoint(1) = yy - height * 1.25
insertionPoint(2) = 0
Set textObj = ACAD.ActiveDocument.ModelSpace.AddText(textString, insertionPoint, height)
textObj.color = acBLACK
End Sub
[Edit - Opaque] - put code into preformatted text