<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: interconnection between AutoCAD and LibreOffice Calc via vba in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9741940#M4208</link>
    <description>&lt;P&gt;Hi to Everybody,&lt;/P&gt;&lt;P&gt;following the&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;suggestions I'm trying to do the opposite of the above code, developed in Autocad VBA, and perfectly working.&lt;/P&gt;&lt;P&gt;So I'm trying to use OpenOffice Calc for Windows, OOBasic, and linking with Autocad in order to pass the coordinates for drawing an object for example, or passing to Autocad dimensional data coming from a calculation obtained with OpenOffice Calc.&lt;/P&gt;&lt;P&gt;Here below the code, able to retrive data from OpenOffice Calc worksheet (same as Excel just more commercial product), open Autocad, but the procedure hangs whenever I'm trying to execute for drawing object,&lt;/P&gt;&lt;P&gt;Set Rectangle = AutocadDoc.modelspace.addlightweightpolyline(RectArray)&lt;/P&gt;&lt;P&gt;I tried also with a simple text I got the same error (see attached picture with error message).&lt;/P&gt;&lt;P&gt;I guess it's not dependent from Autocad but from the way as the OLE link will be established inside OpenOffice.&lt;/P&gt;&lt;P&gt;I tried to debug the Object created in BASIC, using a tools called MRI but too complicate for my product's knowledge&lt;/P&gt;&lt;P&gt;Perhaps somebody of group, or somebody of Autodesk company has some knowledge of both products, and could help us in this issue (perhaps&amp;nbsp;@Anonymous&amp;nbsp;could help us).&lt;/P&gt;&lt;P&gt;I asked the help into OpenOffice forum but of course the didn't know Autocad Application and they are not able to help us.&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub Main
  Dim AutocadApp As Object
  Dim AutocadDoc As Object
  Dim RectArray(0 To 9) As Double
  Dim Rectangle As Object
  Dim oFactory, oApp, oSess, oFolder
  Dim oSheet As Object
  '****** Launch Autocad application****

  oSheets = ThisComponent.getSheets()
  oSheet = oSheets.getByIndex(0)
  oCell = oSheet.getCellByPosition(2, 5)
  oCell1 = oSheet.getCellByPosition(2, 6)
  Q=oCell.getValue()
  R=oCell1.getValue()
  
 ''****Point 1****
   RectArray(0) = 0
   RectArray(1) = 0
 ''****Point 2****
   RectArray(2) = Q
   RectArray(3) = 0
 ''****Point 3****
   RectArray(4) = Q
   RectArray(5) = R
 ''****Point 4****
   RectArray(6) = 0
   RectArray(7) =R

 ''****Point 5****
   RectArray(8) = 0
   RectArray(9) = 0
   
 	oFactory = createUnoService("com.sun.star.bridge.oleautomation.Factory")
 	oApp = oFactory.createInstance("Autocad.application")
  	oApp.Visible = True
 ''****Draw rectangle****
  	Set AutocadDoc = oApp.ActiveDocument
    Set Rectangle = AutocadDoc.modelspace.addlightweightpolyline(RectArray)

End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Sep 2020 10:22:55 GMT</pubDate>
    <dc:creator>grobnik</dc:creator>
    <dc:date>2020-09-11T10:22:55Z</dc:date>
    <item>
      <title>interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9734036#M4195</link>
      <description>&lt;P&gt;is there any method to create an interconnection between AutoCAD and LibreOffice Calc via VBA? I mean similar to AutoCAD and Excel using VBA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 01:41:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9734036#M4195</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2020-09-08T01:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9734838#M4196</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I'm interest to the argument too and I found this site&lt;/P&gt;&lt;P&gt;&lt;A href="https://ask.libreoffice.org/en/question/18/visual-basic-to-calc/" target="_blank" rel="noopener"&gt;https://ask.libreoffice.org/en/question/18/visual-basic-to-calc/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;where it's indicated how to have access to Open Office Calc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Original version VBA:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="typ"&gt;Dim&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; oExcel &lt;/SPAN&gt;&lt;SPAN class="typ"&gt;As&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;Excel&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Application&lt;/SPAN&gt;
&lt;SPAN class="typ"&gt;Dim&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; oBook &lt;/SPAN&gt;&lt;SPAN class="typ"&gt;As&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;Excel&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Workbook&lt;/SPAN&gt;
&lt;SPAN class="typ"&gt;Dim&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; oSheet &lt;/SPAN&gt;&lt;SPAN class="typ"&gt;As&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;Excel&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Worksheet&lt;/SPAN&gt;
&lt;SPAN class="typ"&gt;Dim&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; oApp &lt;/SPAN&gt;&lt;SPAN class="typ"&gt;As&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;Excel&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Application&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;oExcel &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;CreateObject&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"Excel.Application"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;oApp &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;GetObject&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(,&lt;/SPAN&gt; &lt;SPAN class="str"&gt;"Excel.Application"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;oBook &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; oExcel&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Workbooks&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Type&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Missing&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;oSheet &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; oBook&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Worksheets&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;If this statement means to create a new empty Excel file, then the equivalent in LibreOffice BASIC is&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="pln"&gt;sURL &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="str"&gt;"private:factory/scalc"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;objCalc &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;StarDesktop&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;loadComponentFromURL&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;sURL&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt; &lt;SPAN class="str"&gt;"_blank"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt; &lt;SPAN class="lit"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;Array&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;())&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;It will create an empty Calc file, acessible by objCalc object.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 11:23:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9734838#M4196</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-09-08T11:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9735302#M4197</link>
      <description>&lt;P&gt;...but how can I draw a line since LibreOffice Calc to AutoCAD?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 14:43:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9735302#M4197</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2020-09-08T14:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9735371#M4198</link>
      <description>&lt;P&gt;Sincerely I never tested, in addition seems that code shall be developed inside Calc application by Macro tools.&lt;/P&gt;&lt;P&gt;So I'll try to do some tests and I'll investigate more, in my case the requirements it's to write into Calc application from Autocad (like Excel), so I have to find the way to create an object linked to Open Office Calc.&lt;/P&gt;&lt;P&gt;I read also about OLE Object, but again I never tested.&lt;/P&gt;&lt;P&gt;I'll keep you informed, please do the same if you have news on the argoument.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 15:06:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9735371#M4198</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-09-08T15:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9738465#M4199</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;after a lot of test and investigation I found the way to open a new empty Calc Spreadsheet and write on it in a specific cell address.&lt;/P&gt;&lt;P&gt;I don't know if this can help you, but below VBA code written inside Autocad VBA development area.&lt;/P&gt;&lt;P&gt;Let us know&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sub Main()
    'VARIABLES:
        Dim obL_Service_Manager As Object
        Dim obL_Core_Reflection As Object
        Dim obL_Desktop As Object
        Dim srL_Url As String
        Dim obL_Calc_Document As Object
        Dim obL_Sheet As Object
        Dim obL_Range_First_Column As Object
        Dim obL_Range_ToSort As Object
        Dim a1L_Arguments()
        Dim lnL_iLast_Row As Long
        Dim lnL_iLast_Column As Long
    'PROCESS:
        Set obL_Service_Manager = CreateObject("com.sun.star.ServiceManager")
        Set obL_Core_Reflection = obL_Service_Manager.createInstance("com.sun.star.reflection.CoreReflection")
        Set obL_Desktop = obL_Service_Manager.createInstance("com.sun.star.frame.Desktop")
        srL_Url = "private:factory/scalc"
        Set obL_Calc_Document = obL_Desktop.loadComponentFromURL(srL_Url, "_blank", 0, a1L_Arguments)
        Set obL_Sheet = obL_Calc_Document.Sheets.getByIndex(0)

        lnL_iLast_Column = GetLastUsedColumn(obL_Sheet)
        lnL_iLast_Row = GetLastUsedRow(obL_Sheet)
        obL_Sheet.getCellRangeByName("A1").String = "PAPERINO"
End sub

Function GetLastUsedColumn(obL_Sheet) As Long
    Dim obL_Cursor As Object
    Set obL_Cursor = obL_Sheet.createCursor
    obL_Cursor.GotoEndOfUsedArea (True)
    GetLastUsedColumn = obL_Cursor.RangeAddress.EndColumn
End Function

Function GetLastUsedRow(obL_Sheet) As Long
    Dim obL_Cursor As Object
    Set obL_Cursor = obL_Sheet.createCursor
    obL_Cursor.GotoEndOfUsedArea (True)
    GetLastUsedRow = obL_Cursor.RangeAddress.EndRow
End Function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2020 20:48:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9738465#M4199</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-09-09T20:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9739318#M4200</link>
      <description>&lt;P&gt;thanks a lot for your effort MR. &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/472256"&gt;@grobnik&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;...
        obL_Sheet.getCellRangeByName("A1").String = "PAPERINO"
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need both, write in Calc since AutoCAD, and draw a line since Calc to AutoCAD, this help a bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... are you writing in Base and UNO? if yes, could help me to translate this code to Base + UNO, please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Option Explicit

Sub DrawRectangle()
  Dim AutocadApp As Object
  Dim AutocadDoc As Object
  Dim RectArray(0 To 9) As Double
  Dim Rectangle As Object

  '****** Launch Autocad application****
  On Error Resume Next
  Set AutocadApp = GetObject(, "Autocad.application")
  On Error GoTo 0

  If AutocadApp Is Nothing Then
  Set AutocadApp = CreateObject("Autocad.application")
  AutocadApp.Visible = True
  End If

 ''****Point 1****
   RectArray(0) = 0
   RectArray(1) = 0
 ''****Point 2****
   RectArray(2) = ActiveSheet.Range("C6")
   RectArray(3) = 0
 ''****Point 3****
   RectArray(4) = ActiveSheet.Range("C6")
   RectArray(5) = ActiveSheet.Range("C7")
 ''****Point 4****
   RectArray(6) = 0
   RectArray(7) = ActiveSheet.Range("C7")
 ''****Point 5****
   RectArray(8) = 0
   RectArray(9) = 0

 ''****Draw rectangle****
  On Error Resume Next
  Set AutocadDoc = AutocadApp.ActiveDocument
  On Error GoTo 0

  If AutocadApp Is Nothing Then
  Set AutocadDoc = AutocadApp.Document.App
  End If

  Set Rectangle = AutocadDoc.modelspace.addlightweightpolyline(RectArray)
    AutocadApp.ZoomExtents

Set Rectangle = Nothing
Set AutocadApp = Nothing
Set AutocadDoc = Nothing

End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;executing this in calc leave error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;BASIC runtime error. '1'

Type: com.sun.star.lang.WrappedTargetRuntimeException Message: [automation bridge] unexpected exception in IUnknownWrapper::invoke ! Message : [automation bridge]:&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;related link:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://ask.libreoffice.org/en/question/264919/draw-lines-in-autocad-since-libreoffice-calc/" target="_blank"&gt;https://ask.libreoffice.org/en/question/264919/draw-lines-in-autocad-since-libreoffice-calc/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 07:22:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9739318#M4200</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2020-09-10T07:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9739353#M4201</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;thank you for your reply, the above macro has been developed inside &lt;FONT color="#FF0000"&gt;&lt;U&gt;&lt;STRONG&gt;AUTOCAD VBA&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;, more friendly for my knowledge.&lt;/P&gt;&lt;P&gt;I don't know Libreoffice development tools, even if seems very similar to VBA, with some exception of syntax, as well the use of API Standard.&lt;/P&gt;&lt;P&gt;The effort for writing above macro was very big, I used also the Libreoffice forum for help, I'm suggesting you to register you will find a lot of support.&lt;/P&gt;&lt;P&gt;For next step I'll try to read also from Calc document, so you can drawn a line into Autocad, and I will use for a next future.&lt;/P&gt;&lt;P&gt;Bye.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 07:38:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9739353#M4201</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-09-10T07:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9739458#M4202</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;if it's not much of a problem, could you share the link where you was requesting help?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 08:31:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9739458#M4202</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2020-09-10T08:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9739476#M4203</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the first for documentation&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Cells_and_Ranges" target="_blank" rel="noopener"&gt;https://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Cells_and_Ranges&lt;/A&gt;&amp;nbsp;(link related to cells range, but containing a lot of info).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second one it's the forum&lt;/P&gt;&lt;P&gt;&lt;A href="https://forum.openoffice.org/en/forum/index.php?sid=a162064ae6f3fab8f70b89f7ba879f85" target="_blank" rel="noopener"&gt;https://forum.openoffice.org/en/forum/index.php?sid=a162064ae6f3fab8f70b89f7ba879f85&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More others for macro, documentation, sample and so on.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.pitonyak.org/oo.php" target="_blank" rel="noopener"&gt;http://www.pitonyak.org/oo.php&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and it will list what properties and methods are available to it, but inside OpenOffice development area..&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://extensions.openoffice.org/en/project/mri-uno-object-inspection-tool" target="_blank" rel="noopener"&gt;https://extensions.openoffice.org/en/pr ... ction-tool&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 08:37:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9739476#M4203</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-09-10T08:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9739871#M4204</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;here below your code perfect working. &lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Again as previously indicated the code has been developed inside Autocad VBA development ambient,&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt; because I know better such area, and in my opinion should be better.&lt;/P&gt;&lt;P&gt;I created a Calc file Named&amp;nbsp;MyRect.ods (See zip file attached) and put into cells C6 and C7 some value 100 and 200 for example.&lt;/P&gt;&lt;P&gt;Of course the path and file name could be changed here:&lt;/P&gt;&lt;P&gt;srL_Url = "file:///C:\Users\IO\Desktop\MyRect.ods"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The trick for reading cell value it's inside:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;obL_Sheet.getCellRangeByName("C7").Value&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;obL_Sheet.getCellByPosition(Row, Col).Value&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if contents it's a string change .&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Value&lt;/FONT&gt; &lt;/STRONG&gt;with&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt; .String&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See attached image of a rectangle.&lt;/P&gt;&lt;P&gt;Let me know, including the address where to delivery the invoice &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; (I'm joking, of course).&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub DrawRectangle()
'VARIABLES:
   ' Dim AutocadApp As Object
   ' Dim AutocadDoc As Object
    Dim RectArray(0 To 9) As Double
    Dim Rectangle As Object
    Dim obL_Service_Manager As Object
    Dim obL_Core_Reflection As Object
    Dim obL_Desktop As Object
    Dim srL_Url As String
    Dim obL_Calc_Document As Object
    Dim obL_Sheet As Object
    Dim a1L_Arguments()
    
  '****** Launch Autocad application**** NO NECESSARY ALREADY INSIDE AUTOCAD
 ' On Error Resume Next
 ' Set AutocadApp = GetObject(, "Autocad.application")
 ' On Error GoTo 0

  'If AutocadApp Is Nothing Then
  'Set AutocadApp = CreateObject("Autocad.application")
  'AutocadApp.Visible = True
  'End If
  
  
  '****** Create link with OpenOffice Calc application and open a specific Calc sheet containing the rectangle coordinates****
   'PROCESS:
        Set obL_Service_Manager = CreateObject("com.sun.star.ServiceManager")
        Set obL_Core_Reflection = obL_Service_Manager.createInstance("com.sun.star.reflection.CoreReflection")
        Set obL_Desktop = obL_Service_Manager.createInstance("com.sun.star.frame.Desktop")
        
  '****** Use below Code for a New empty Calc Sheet ******
        'srL_Url = "private:factory/scalc"
        'Set obL_Calc_Document = obL_Desktop.loadComponentFromURL(srL_Url, "_blank", 0, a1L_Arguments)
        'Set obL_Sheet = obL_Calc_Document.Sheets.getByIndex(0)
        
  '****** Use below Code for open a specific Calc Sheet ******
        srL_Url = "file:///C:\Users\IO\Desktop\MyRect.ods"
        Set obL_Calc_Document = obL_Desktop.loadComponentFromURL(srL_Url, "_blank", 0, a1L_Arguments)
        Set obL_Sheet = obL_Calc_Document.Sheets.getByIndex(0)


 ''****Point 1****
   RectArray(0) = 0
   RectArray(1) = 0
 ''****Point 2****
   RectArray(2) = obL_Sheet.getCellRangeByName("C6").Value
   RectArray(3) = 0
 ''****Point 3****
   RectArray(4) = obL_Sheet.getCellRangeByName("C6").Value
   RectArray(5) = obL_Sheet.getCellRangeByName("C7").Value
 ''****Point 4****
   RectArray(6) = 0
   RectArray(7) = obL_Sheet.getCellRangeByName("C7").Value
 ''****Point 5****
   RectArray(8) = 0
   RectArray(9) = 0

 ''****Draw rectangle****
  'On Error Resume Next
  'Set AutocadDoc = AutocadApp.ActiveDocument
  'On Error GoTo 0

  'If AutocadApp Is Nothing Then
  'Set AutocadDoc = AutocadApp.Document.App
  'End If

  Set Rectangle = ThisDrawing.ModelSpace.AddLightWeightPolyline(RectArray)
  Application.ZoomExtents

'AutocadApp.ZoomExtents

'Set Rectangle = Nothing
'Set AutocadApp = Nothing
'Set AutocadDoc = Nothing

End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grobnik_0-1599740689782.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/817634i957DEE8162323918/image-size/medium?v=v2&amp;amp;px=400" role="button" title="grobnik_0-1599740689782.png" alt="grobnik_0-1599740689782.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 12:31:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9739871#M4204</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-09-10T12:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9740210#M4205</link>
      <description>&lt;P&gt;cool, work perfectly, good idea calling to LO Calc since AutoCAD VBA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... it is possible to do the inverse? I mean, draw since LO Calc VBA-Base-UNO to AutoCAD?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 14:58:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9740210#M4205</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2020-09-10T14:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9740236#M4206</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;, it may be, but as explained my experience it's more oriented on Autocad side, so this is the main reason because I started in this way Autocad Vs Calc.&lt;/P&gt;&lt;P&gt;In addition the core it's Autocad where you have to drawn objects, so I'm never seeing reasons for starting from OpenOffice and ending to Autocad.&lt;/P&gt;&lt;P&gt;Could me explain reasons because do you want to do the opposite ? Probably you already have some procedure, more complex than drawing a rectangle, written on VBA-Base-UNO ?&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 15:09:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9740236#M4206</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-09-10T15:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9740306#M4207</link>
      <description>&lt;P&gt;yes, there is a reason...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/c/MustafaAbdelBaset/videos" target="_blank"&gt;https://www.youtube.com/c/MustafaAbdelBaset/videos&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this channel created a tool named "Circuit Pro", and is awesome for electrical plan design and use excel and encrypted vlx, the problem is than he is not updating or fixing their code and I want to use their excel VBA modules but since Calc to draw in AutoCAD because he already has a lot of modules. I choice calc and not excel just because is open source and free.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check their channel, has very good tools, &lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN&gt;highly recommended&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 15:33:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9740306#M4207</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2020-09-10T15:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: interconnection between AutoCAD and LibreOffice Calc via vba</title>
      <link>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9741940#M4208</link>
      <description>&lt;P&gt;Hi to Everybody,&lt;/P&gt;&lt;P&gt;following the&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;suggestions I'm trying to do the opposite of the above code, developed in Autocad VBA, and perfectly working.&lt;/P&gt;&lt;P&gt;So I'm trying to use OpenOffice Calc for Windows, OOBasic, and linking with Autocad in order to pass the coordinates for drawing an object for example, or passing to Autocad dimensional data coming from a calculation obtained with OpenOffice Calc.&lt;/P&gt;&lt;P&gt;Here below the code, able to retrive data from OpenOffice Calc worksheet (same as Excel just more commercial product), open Autocad, but the procedure hangs whenever I'm trying to execute for drawing object,&lt;/P&gt;&lt;P&gt;Set Rectangle = AutocadDoc.modelspace.addlightweightpolyline(RectArray)&lt;/P&gt;&lt;P&gt;I tried also with a simple text I got the same error (see attached picture with error message).&lt;/P&gt;&lt;P&gt;I guess it's not dependent from Autocad but from the way as the OLE link will be established inside OpenOffice.&lt;/P&gt;&lt;P&gt;I tried to debug the Object created in BASIC, using a tools called MRI but too complicate for my product's knowledge&lt;/P&gt;&lt;P&gt;Perhaps somebody of group, or somebody of Autodesk company has some knowledge of both products, and could help us in this issue (perhaps&amp;nbsp;@Anonymous&amp;nbsp;could help us).&lt;/P&gt;&lt;P&gt;I asked the help into OpenOffice forum but of course the didn't know Autocad Application and they are not able to help us.&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub Main
  Dim AutocadApp As Object
  Dim AutocadDoc As Object
  Dim RectArray(0 To 9) As Double
  Dim Rectangle As Object
  Dim oFactory, oApp, oSess, oFolder
  Dim oSheet As Object
  '****** Launch Autocad application****

  oSheets = ThisComponent.getSheets()
  oSheet = oSheets.getByIndex(0)
  oCell = oSheet.getCellByPosition(2, 5)
  oCell1 = oSheet.getCellByPosition(2, 6)
  Q=oCell.getValue()
  R=oCell1.getValue()
  
 ''****Point 1****
   RectArray(0) = 0
   RectArray(1) = 0
 ''****Point 2****
   RectArray(2) = Q
   RectArray(3) = 0
 ''****Point 3****
   RectArray(4) = Q
   RectArray(5) = R
 ''****Point 4****
   RectArray(6) = 0
   RectArray(7) =R

 ''****Point 5****
   RectArray(8) = 0
   RectArray(9) = 0
   
 	oFactory = createUnoService("com.sun.star.bridge.oleautomation.Factory")
 	oApp = oFactory.createInstance("Autocad.application")
  	oApp.Visible = True
 ''****Draw rectangle****
  	Set AutocadDoc = oApp.ActiveDocument
    Set Rectangle = AutocadDoc.modelspace.addlightweightpolyline(RectArray)

End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 10:22:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/interconnection-between-autocad-and-libreoffice-calc-via-vba/m-p/9741940#M4208</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2020-09-11T10:22:55Z</dc:date>
    </item>
  </channel>
</rss>

