<?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: Dimension List... in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/dimension-list/m-p/1627325#M34893</link>
    <description>Matthew,&lt;BR /&gt;
&lt;BR /&gt;
I'm not sure if this is quite what you're after, but there are a few things &lt;BR /&gt;
to learn from this (you said you were a new to VBA in another post, so I'm &lt;BR /&gt;
explaining a lot here). If you're trying to display all the dimension values &lt;BR /&gt;
at the completion of every Dimension command, you'll want to tap into the &lt;BR /&gt;
AcadDocument's EndCommand event. In VBAIDE, you get to this by &lt;BR /&gt;
double-clicking the ThisDrawing object in the Project window, then selecting &lt;BR /&gt;
"AcadDocument" in the left drop-down list at the top of the code module &lt;BR /&gt;
window, and then selecting EndCommand from the right drop-down list.&lt;BR /&gt;
&lt;BR /&gt;
Every time a command ends, it triggers the EndCommand event and sends the &lt;BR /&gt;
name of the command just ending. By examining this name, you can then decide &lt;BR /&gt;
whether you want to do something or not. The code below watches for any &lt;BR /&gt;
command with "DIM" as part of the command name, then iterates all the &lt;BR /&gt;
objects in PaperSpace to find aligned and rotated dimensions. When it finds &lt;BR /&gt;
one of these types of objects, it finds the measured length via the &lt;BR /&gt;
Measurement property, then converts it to a string in the current drawing's &lt;BR /&gt;
settings for units and precision and displays it in the text screen.&lt;BR /&gt;
&lt;BR /&gt;
Private Sub AcadDocument_EndCommand(ByVal CommandName As String)&lt;BR /&gt;
Dim oDimension As AcadDimRotated&lt;BR /&gt;
Dim oEnt As AcadEntity&lt;BR /&gt;
Dim Util As AcadUtility&lt;BR /&gt;
Dim dMeasurement As Double&lt;BR /&gt;
&lt;BR /&gt;
Set Util = ThisDrawing.Utility&lt;BR /&gt;
If InStr(1, CommandName, "DIM") &amp;gt; 0 Then&lt;BR /&gt;
    For Each oEnt In ThisDrawing.PaperSpace   'where are your dimensions???&lt;BR /&gt;
        Debug.Print TypeName(oEnt)&lt;BR /&gt;
        If TypeOf oEnt Is AcadDimAligned Or TypeOf oEnt Is AcadDimRotated &lt;BR /&gt;
Then   'include other types of dimensions???&lt;BR /&gt;
            dMeasurement = oEnt.Measurement&lt;BR /&gt;
            Util.Prompt vbCrLf &amp;amp; "Dim Length: " &amp;amp; &lt;BR /&gt;
Util.RealToString(dMeasurement, ThisDrawing.GetVariable("lunits"), &lt;BR /&gt;
ThisDrawing.GetVariable("luprec"))&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next oEnt&lt;BR /&gt;
End If&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
This obviously gets out of control once you have a lot of dimensions in your &lt;BR /&gt;
drawing...but should get you going in the right direction, unless I &lt;BR /&gt;
completely misinterpreted your question.&lt;BR /&gt;
&lt;BR /&gt;
Ben Rand&lt;BR /&gt;
CAD Manager&lt;BR /&gt;
CEntry Constructors &amp;amp; Engineers&lt;BR /&gt;
brand@centry.net&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;what i would like to do is create a push button that will let the user &lt;BR /&gt;
&amp;gt;start making dimensions on a drawing, when they are completed as the hit &lt;BR /&gt;
&amp;gt;enter i would &amp;gt;like a list to the side of how many dims there are and the &lt;BR /&gt;
&amp;gt;dimension itself....&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;Example list:&lt;BR /&gt;
&amp;gt;1. 4'-3"&lt;BR /&gt;
&amp;gt;2. 7'-5"&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;and so on.... anyone send me down the correct path?</description>
    <pubDate>Fri, 28 Apr 2006 02:34:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-04-28T02:34:14Z</dc:date>
    <item>
      <title>Dimension List...</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dimension-list/m-p/1627324#M34892</link>
      <description>what i would like to do is create a push button that will let the user start making dimensions on a drawing, when they are completed as the hit enter i would like a list to the side of how many dims there are and the dimension itself....&lt;BR /&gt;
&lt;BR /&gt;
Example list:&lt;BR /&gt;
1. 4'-3"&lt;BR /&gt;
2. 7'-5"&lt;BR /&gt;
&lt;BR /&gt;
and so on.... anyone send me down the correct path?</description>
      <pubDate>Thu, 27 Apr 2006 21:45:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dimension-list/m-p/1627324#M34892</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-04-27T21:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dimension List...</title>
      <link>https://forums.autodesk.com/t5/vba-forum/dimension-list/m-p/1627325#M34893</link>
      <description>Matthew,&lt;BR /&gt;
&lt;BR /&gt;
I'm not sure if this is quite what you're after, but there are a few things &lt;BR /&gt;
to learn from this (you said you were a new to VBA in another post, so I'm &lt;BR /&gt;
explaining a lot here). If you're trying to display all the dimension values &lt;BR /&gt;
at the completion of every Dimension command, you'll want to tap into the &lt;BR /&gt;
AcadDocument's EndCommand event. In VBAIDE, you get to this by &lt;BR /&gt;
double-clicking the ThisDrawing object in the Project window, then selecting &lt;BR /&gt;
"AcadDocument" in the left drop-down list at the top of the code module &lt;BR /&gt;
window, and then selecting EndCommand from the right drop-down list.&lt;BR /&gt;
&lt;BR /&gt;
Every time a command ends, it triggers the EndCommand event and sends the &lt;BR /&gt;
name of the command just ending. By examining this name, you can then decide &lt;BR /&gt;
whether you want to do something or not. The code below watches for any &lt;BR /&gt;
command with "DIM" as part of the command name, then iterates all the &lt;BR /&gt;
objects in PaperSpace to find aligned and rotated dimensions. When it finds &lt;BR /&gt;
one of these types of objects, it finds the measured length via the &lt;BR /&gt;
Measurement property, then converts it to a string in the current drawing's &lt;BR /&gt;
settings for units and precision and displays it in the text screen.&lt;BR /&gt;
&lt;BR /&gt;
Private Sub AcadDocument_EndCommand(ByVal CommandName As String)&lt;BR /&gt;
Dim oDimension As AcadDimRotated&lt;BR /&gt;
Dim oEnt As AcadEntity&lt;BR /&gt;
Dim Util As AcadUtility&lt;BR /&gt;
Dim dMeasurement As Double&lt;BR /&gt;
&lt;BR /&gt;
Set Util = ThisDrawing.Utility&lt;BR /&gt;
If InStr(1, CommandName, "DIM") &amp;gt; 0 Then&lt;BR /&gt;
    For Each oEnt In ThisDrawing.PaperSpace   'where are your dimensions???&lt;BR /&gt;
        Debug.Print TypeName(oEnt)&lt;BR /&gt;
        If TypeOf oEnt Is AcadDimAligned Or TypeOf oEnt Is AcadDimRotated &lt;BR /&gt;
Then   'include other types of dimensions???&lt;BR /&gt;
            dMeasurement = oEnt.Measurement&lt;BR /&gt;
            Util.Prompt vbCrLf &amp;amp; "Dim Length: " &amp;amp; &lt;BR /&gt;
Util.RealToString(dMeasurement, ThisDrawing.GetVariable("lunits"), &lt;BR /&gt;
ThisDrawing.GetVariable("luprec"))&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next oEnt&lt;BR /&gt;
End If&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
This obviously gets out of control once you have a lot of dimensions in your &lt;BR /&gt;
drawing...but should get you going in the right direction, unless I &lt;BR /&gt;
completely misinterpreted your question.&lt;BR /&gt;
&lt;BR /&gt;
Ben Rand&lt;BR /&gt;
CAD Manager&lt;BR /&gt;
CEntry Constructors &amp;amp; Engineers&lt;BR /&gt;
brand@centry.net&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;what i would like to do is create a push button that will let the user &lt;BR /&gt;
&amp;gt;start making dimensions on a drawing, when they are completed as the hit &lt;BR /&gt;
&amp;gt;enter i would &amp;gt;like a list to the side of how many dims there are and the &lt;BR /&gt;
&amp;gt;dimension itself....&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;Example list:&lt;BR /&gt;
&amp;gt;1. 4'-3"&lt;BR /&gt;
&amp;gt;2. 7'-5"&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;and so on.... anyone send me down the correct path?</description>
      <pubDate>Fri, 28 Apr 2006 02:34:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/dimension-list/m-p/1627325#M34893</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-04-28T02:34:14Z</dc:date>
    </item>
  </channel>
</rss>

