<?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 multiple dimension dxf generation in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/multiple-dimension-dxf-generation/m-p/3947150#M11146</link>
    <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have created a simle part file which has a User parameter (L). The part should be cut with a laser cutting machine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is, that there is 76 different dimensions for L parameter. So I have to generate 76 different dxf drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there a way to crearte a VBA code for modifying the L parameter, regenerate the part file, and export the surface of the part file as a DXF file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;arnold&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2013 10:10:55 GMT</pubDate>
    <dc:creator>arnold_noel</dc:creator>
    <dc:date>2013-06-05T10:10:55Z</dc:date>
    <item>
      <title>multiple dimension dxf generation</title>
      <link>https://forums.autodesk.com/t5/vba-forum/multiple-dimension-dxf-generation/m-p/3947150#M11146</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have created a simle part file which has a User parameter (L). The part should be cut with a laser cutting machine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is, that there is 76 different dimensions for L parameter. So I have to generate 76 different dxf drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there a way to crearte a VBA code for modifying the L parameter, regenerate the part file, and export the surface of the part file as a DXF file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;arnold&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2013 10:10:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/multiple-dimension-dxf-generation/m-p/3947150#M11146</guid>
      <dc:creator>arnold_noel</dc:creator>
      <dc:date>2013-06-05T10:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: multiple dimension dxf generation</title>
      <link>https://forums.autodesk.com/t5/vba-forum/multiple-dimension-dxf-generation/m-p/3947534#M11147</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;My guess &lt;/SPAN&gt;&lt;SPAN&gt;is to &lt;/SPAN&gt;&lt;SPAN&gt;wrte a function&lt;/SPAN&gt;&lt;SPAN&gt;t hat will &lt;/SPAN&gt;&lt;SPAN&gt;draw&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;your detail,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;depending on the value of&lt;/SPAN&gt;&lt;SPAN&gt; the L &lt;/SPAN&gt;&lt;SPAN&gt;parameter,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and then &lt;/SPAN&gt;&lt;SPAN&gt;select the &lt;/SPAN&gt;&lt;SPAN&gt;newly created &lt;/SPAN&gt;&lt;SPAN&gt;item &lt;/SPAN&gt;&lt;SPAN&gt;and &lt;/SPAN&gt;&lt;SPAN&gt;then &lt;/SPAN&gt;&lt;SPAN&gt;write selection to a dwg file using &lt;/SPAN&gt;&lt;SPAN&gt;WBLOCK &lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;then &lt;/SPAN&gt;&lt;SPAN&gt;open it &lt;/SPAN&gt;&lt;SPAN&gt;and re&lt;/SPAN&gt;&lt;SPAN&gt;save a file as &lt;/SPAN&gt;&lt;SPAN&gt;dxf &lt;/SPAN&gt;&lt;SPAN&gt;and at the end delete &lt;SPAN&gt;previous&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;dwg &lt;/SPAN&gt;&lt;SPAN&gt;file&amp;nbsp;using&lt;/SPAN&gt;&lt;SPAN&gt;KILL &lt;/SPAN&gt;&lt;SPAN&gt;method&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Jun 2013 15:20:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/multiple-dimension-dxf-generation/m-p/3947534#M11147</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2013-06-05T15:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: multiple dimension dxf generation</title>
      <link>https://forums.autodesk.com/t5/vba-forum/multiple-dimension-dxf-generation/m-p/3947556#M11148</link>
      <description>&lt;P&gt;Here is quick example, was written in a hurry,&lt;/P&gt;&lt;P&gt;so check all names and value&lt;/P&gt;&lt;PRE&gt;''--- Borrowed from on Juergen Menzi ---''
Public Sub WblockSelection(detailName As String, Lparam As Double)

  Dim wdoc As AcadDocument

  Dim SelSet As AcadSelectionSet

    
  Set SelSet = NewSelectionSet("WBLOCK_SET")
 
  With ThisDrawing
    SelSet.SelectOnScreen

   Dim path As String
   path = .FullName
   Dim dwgName As String
   dwgName = detailName &amp;amp; "_" &amp;amp; Replace(CStr(Lparam), ",", "_", 1, -1, vbTextCompare)
   Dim outFile As String
   outFile = .GetVariable("dwgprefix")
   outFile = outFile &amp;amp; dwgName &amp;amp; ".dwg"
  .Wblock outFile, SelSet
  End With
  Dim dxfFolder As String
  dxfFolder = "C:\Test\DxfFolder\"
  Dim dxfName As String
  dxfName = dxfFolder &amp;amp; dwgName &amp;amp; ".dxf"
Set wdoc = Application.Documents.Open(outFile, False, "")
Call wdoc.SaveAs(dxfName, ac2000_dxf, Nothing)
wdoc.Close
Kill outFile

End Sub



Public Function NewSelectionSet(AssNme As String) As AcadSelectionSet
  Dim SelSet As AcadSelectionSet
  Dim SelCol As AcadSelectionSets
  With ThisDrawing
    Set SelCol = .SelectionSets
    For Each SelSet In SelCol
      If SelSet.Name = AssNme Then
        .SelectionSets.Item(AssNme).Delete
        Exit For
      End If
    Next
    Set SelSet = .SelectionSets.Add(AssNme)
  End With
  Set NewSelectionSet = SelSet
End Function


Public Sub Test_Wblock()
Dim lpar As Double
lpar = 1200.5
Dim shp As String
shp = "FOO"
Call WblockSelection(shp, lpar)
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2013 15:31:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/multiple-dimension-dxf-generation/m-p/3947556#M11148</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2013-06-05T15:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: multiple dimension dxf generation</title>
      <link>https://forums.autodesk.com/t5/vba-forum/multiple-dimension-dxf-generation/m-p/3947765#M11149</link>
      <description>&lt;P&gt;thanks for the example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is this for autocad?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 3-4 dimensions driven of this L parameter. can the part generation be done in autocad?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i don't really understand ehat are you doing in the NewSelectionSet function.&lt;/P&gt;&lt;P&gt;your function should update the part with the new dimensions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2013 17:56:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/multiple-dimension-dxf-generation/m-p/3947765#M11149</guid>
      <dc:creator>arnold_noel</dc:creator>
      <dc:date>2013-06-05T17:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: multiple dimension dxf generation</title>
      <link>https://forums.autodesk.com/t5/vba-forum/multiple-dimension-dxf-generation/m-p/3947785#M11150</link>
      <description>&lt;P&gt;This code will work with existing details, say if these has different L parameter&lt;/P&gt;&lt;P&gt;and yoiu now yhis value as well as detail name then you can create dxf's using this code&lt;/P&gt;&lt;P&gt;Or you wanted be on another lanfguage, say VB.NET or C#?&lt;/P&gt;&lt;P&gt;Also you&amp;nbsp;could be uppload&amp;nbsp;the picture here to show your detail&lt;/P&gt;&lt;P&gt;But sorry I can more help. some my own proble occurs&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2013 18:06:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/multiple-dimension-dxf-generation/m-p/3947785#M11150</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2013-06-05T18:06:40Z</dc:date>
    </item>
  </channel>
</rss>

