<?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: Update section plane blocks automatically in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/10693566#M108912</link>
    <description>&lt;P&gt;Dear brad&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; have a 3D module for building and I need to generate 25 section view for the building in each update.&lt;/P&gt;&lt;P&gt;I working using Excel VBA to Draw/Modified the building but i can't generate the section view by excel VBA&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you help my, how i can do it ( only in need to know how i can write the command in excel )&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance for your help&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Oct 2021 08:56:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-10-17T08:56:03Z</dc:date>
    <item>
      <title>Update section plane blocks automatically</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/7769388#M108909</link>
      <description>&lt;P&gt;I have a 3D model of a building and have several section planes setup to create specific elevation views in different areas of the building.&amp;nbsp; Each week I receive an updated version of the model and have to update those elevation views.&amp;nbsp; The process I'm using is to select the section plane, select generate section block, and then choose the block to replace.&amp;nbsp; I have around 30 different sections and this process is very time consuming.&amp;nbsp; Is there a way to link a section plane to a specific block and have the sections update automatically?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Brad&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 21:57:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/7769388#M108909</guid>
      <dc:creator>bsanada</dc:creator>
      <dc:date>2018-02-11T21:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Update section plane blocks automatically</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/8581355#M108910</link>
      <description>&lt;P&gt;Hi Brad,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've been doing something similar with bridges, seem to have a reasonable method going. The drawing I'm currently working on has 80 section planes, didn't take me long to realise updating manually wasn't an option!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use the export to file option, and each section plane exports to it's own file. Just enter the file path + name in the section settings and it generates the drawing in that location, and then each subsequent time you click "generate section block","create" it will override that drawing. You can then xref that drawing into your main drawing, so each time you do update the section, simply reload the xref. Works pretty well for me!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Only thing to look out for - if you have the "apply settings to all section objects" box ticked in the section settings, then any time you change the settings it will reset the filepaths of ALL the section planes to the same place... so untick this. If you want to change section settings, you'll have to do them one by one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 21:57:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/8581355#M108910</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-07T21:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update section plane blocks automatically</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/8581400#M108911</link>
      <description>&lt;P&gt;This looks like a very reasonable work-around.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 22:20:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/8581400#M108911</guid>
      <dc:creator>bsanada</dc:creator>
      <dc:date>2019-02-07T22:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Update section plane blocks automatically</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/10693566#M108912</link>
      <description>&lt;P&gt;Dear brad&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; have a 3D module for building and I need to generate 25 section view for the building in each update.&lt;/P&gt;&lt;P&gt;I working using Excel VBA to Draw/Modified the building but i can't generate the section view by excel VBA&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you help my, how i can do it ( only in need to know how i can write the command in excel )&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance for your help&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Oct 2021 08:56:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/10693566#M108912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-17T08:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Update section plane blocks automatically</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/10694565#M108913</link>
      <description>&lt;P&gt;You just need to google VBA Excel Autocad and you will find a lot of examples about Excel controlling Autocad, this is an example of draw a line, pline and circle.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub Opendwg()
 
    Dim acadApp As Object
    Dim acadDoc As Object

 'Check if AutoCAD application is open. If is not opened create a new instance and make it visible.
    On Error Resume Next
    Set acadApp = GetObject(, "AutoCAD.Application")
    If acadApp Is Nothing Then
        Set acadApp = CreateObject("AutoCAD.Application")
        acadApp.Visible = True
    End If
 
    'Check (again) if there is an AutoCAD object.
    If acadApp Is Nothing Then
        MsgBox "Sorry, it was impossible to start AutoCAD!", vbCritical, "AutoCAD Error"
        Exit Sub
    End If
    On Error GoTo 0
 
    'If there is no active drawing create a new one.
    On Error Resume Next
    Set acadDoc = acadApp.ActiveDocument
    If acadDoc Is Nothing Then
        Set acadDoc = acadApp.Documents.Add
    End If
    On Error GoTo 0
  
    'Check if the active space is paper space and change it to model space.
    If acadDoc.ActiveSpace = 0 Then '0 = acPaperSpace in early binding
        acadDoc.ActiveSpace = 1     '1 = acModelSpace in early binding
    End If

 End Sub
 
Public Sub addline(x1, y1, z1, x2, y2, z2)
  
 ' Create the line in model space
    Dim acadApp As Object
    Dim acadDoc As Object
    Set acadApp = GetObject(, "AutoCAD.Application")
    Set acadDoc = acadApp.ActiveDocument

    Dim startpoint(0 To 2) As Double
    Dim endpoint(0 To 2) As Double
    Dim lineobj As Object

    startpoint(0) = x1: startpoint(1) = y1: startpoint(2) = z1
    endpoint(0) = x2: endpoint(1) = y2: endpoint(2) = z2

    Set lineobj = acadDoc.ModelSpace.addline(startpoint, endpoint)
    acadApp.ZoomExtents
    
    End Sub
    Public Sub addcirc(x1, y1, z1, rad)
  
 ' Create the circle in model space
    Dim acadApp As Object
    Dim acadDoc As Object
    Set acadApp = GetObject(, "AutoCAD.Application")
    Set acadDoc = acadApp.ActiveDocument

    Dim cenpoint(0 To 2) As Double
   
    Dim circobj As Object

   cenpoint(0) = x1: cenpoint(1) = y1: cenpoint(2) = z1
    Set circobj = acadDoc.ModelSpace.addcircle(cenpoint, rad)
    acadApp.ZoomExtents
    
    End Sub
    
    
    Sub addpoly(cords, col)
    
    Dim acadApp As Object
    Dim acadDoc As Object
    Set acadApp = GetObject(, "AutoCAD.Application")
    Set acadDoc = acadApp.ActiveDocument

    Dim oPline As Object
    
' add pline to Modelspace
Set oPline = acadDoc.ModelSpace.AddLightWeightPolyline(cords)
oPline.Color = col

End Sub
   
    Sub alan1()
    
   
' This example adds a line in model space
' Define the start and end points for the line
   
    px1 = 1
    px2 = 5
    py1 = 1
    py2 = 5
    pz1 = 0
    pz2 = 0
    

Call addline(px1, py1, pz1, px2, py2, pz2)

End Sub

 Sub alan2()
 
    px1 = 1
    py1 = 1
    pz1 = 0
    Radius = 8.5
 
 Call addcirc(px1, py1, pz1, Radius)

 End Sub
 
 Sub alan3()
 'Dim coords(0 To n) As Double
 Dim coords(0 To 5) As Double
 coords(0) = -6: coords(1) = 1:
 coords(2) = 3: coords(3) = 5:
 coords(4) = 7.55: coords(5) = 6.25:
 
 col = 1
    
 Call addpoly(coords, col)

 End Sub&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 18 Oct 2021 03:08:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/10694565#M108913</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-10-18T03:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Update section plane blocks automatically</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/10727582#M108914</link>
      <description>Dear Sea-Haven&lt;BR /&gt;Thanks for your reply, Actually I already know some and download a lot of Excel macro and check it very well&lt;BR /&gt;and Now , I can Draw the room and insert the equipment using the Excel VBA.&lt;BR /&gt;what I need to know is how to generate section plan view using Excel VBA , traying to search a lot but it is loos less.&lt;BR /&gt;thanks for you all the time</description>
      <pubDate>Mon, 01 Nov 2021 11:18:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-section-plane-blocks-automatically/m-p/10727582#M108914</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-01T11:18:45Z</dc:date>
    </item>
  </channel>
</rss>

