<?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: Simple automated line drawing in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/simple-automated-line-drawing/m-p/1986580#M25001</link>
    <description>Thanks a lot folks, I'll look at this stuff over the weekend. Much &lt;BR /&gt;
appreciated!&lt;BR /&gt;
&lt;BR /&gt;
-C&lt;BR /&gt;
&lt;BR /&gt;
&lt;FATTY&gt; wrote in message news:5617595@discussion.autodesk.com...&lt;BR /&gt;
Try this one&lt;BR /&gt;
&lt;BR /&gt;
~'J'~&lt;/FATTY&gt;</description>
    <pubDate>Wed, 06 Jun 2007 20:08:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-06-06T20:08:26Z</dc:date>
    <item>
      <title>Simple automated line drawing</title>
      <link>https://forums.autodesk.com/t5/vba-forum/simple-automated-line-drawing/m-p/1986576#M24997</link>
      <description>Hello everyone, this is my first post so try to go easy on me &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
I have what I hope is a very simple request, I would like to create a macro &lt;BR /&gt;
that works like the following;&lt;BR /&gt;
&lt;BR /&gt;
- I execute this custom command&lt;BR /&gt;
- It asks me to choose a rectangle&lt;BR /&gt;
- It draws 2 lines in the rectangle on the current layer, from corner to &lt;BR /&gt;
corner, forming an "X"&lt;BR /&gt;
&lt;BR /&gt;
That's it. It would be great if I could further automate it so that it could &lt;BR /&gt;
accept multiple rectangles and then fill each one of them in sequence. This &lt;BR /&gt;
sounds weird I'm sure, but it's something I have to do on a VERY repetivie &lt;BR /&gt;
basis, and it would be great to automate.&lt;BR /&gt;
&lt;BR /&gt;
I did some VBA coding for Excel years ago, but I am basically clueless on &lt;BR /&gt;
where to start here. Thanks  very much for your help!&lt;BR /&gt;
&lt;BR /&gt;
-C</description>
      <pubDate>Tue, 05 Jun 2007 18:48:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/simple-automated-line-drawing/m-p/1986576#M24997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-06-05T18:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Simple automated line drawing</title>
      <link>https://forums.autodesk.com/t5/vba-forum/simple-automated-line-drawing/m-p/1986577#M24998</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
The pseudo code you need is:&lt;BR /&gt;
&lt;BR /&gt;
Select an object from the drawing&lt;BR /&gt;
Check the type of object:  AutoCAD has three types of polyline and you have &lt;BR /&gt;
to handle them slightly differently&lt;BR /&gt;
If LW polyline&lt;BR /&gt;
Get its coordinates:&lt;BR /&gt;
Set a start point to coordinates (0) and (1)&lt;BR /&gt;
Set an end point to coordinates (4) and (5)&lt;BR /&gt;
Draw a line from start to end&lt;BR /&gt;
Set a start point to coordinates (2) and (3)&lt;BR /&gt;
Set an end point to coordinates (6) and (7)&lt;BR /&gt;
Draw a line from start to end&lt;BR /&gt;
If normal or 3D polyline&lt;BR /&gt;
Get its coordinates: (in this case every third coordinate is an elevation &lt;BR /&gt;
value)&lt;BR /&gt;
Set a start point to coordinates (0) and (1)&lt;BR /&gt;
Set an end point to coordinates (6) and (7)&lt;BR /&gt;
Draw a line from start to end&lt;BR /&gt;
Set a start point to coordinates (3) and (4)&lt;BR /&gt;
Set an end point to coordinates (9) and (10)&lt;BR /&gt;
Draw a line from start to end&lt;BR /&gt;
&lt;BR /&gt;
If you make the processing code a sub routine then processing multiples is &lt;BR /&gt;
very easy&lt;BR /&gt;
Select a collection of objects from drawing with filter to be polylines only&lt;BR /&gt;
For each polyline in collection   run sub routine&lt;BR /&gt;
Delete Collection item in your code&lt;BR /&gt;
&lt;BR /&gt;
All the code you need to do this can be found in the sample code in the help &lt;BR /&gt;
system and/or by searching this newsgroup&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
&lt;BR /&gt;
Laurie Comerford&lt;BR /&gt;
CADApps&lt;BR /&gt;
www.cadapps.com.au&lt;BR /&gt;
www.civil3Dtools.com&lt;BR /&gt;
"Carson Christian" &lt;CCHRISTIAN&gt; wrote in message &lt;BR /&gt;
news:5616965@discussion.autodesk.com...&lt;BR /&gt;
Hello everyone, this is my first post so try to go easy on me &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
I have what I hope is a very simple request, I would like to create a macro&lt;BR /&gt;
that works like the following;&lt;BR /&gt;
&lt;BR /&gt;
- I execute this custom command&lt;BR /&gt;
- It asks me to choose a rectangle&lt;BR /&gt;
- It draws 2 lines in the rectangle on the current layer, from corner to&lt;BR /&gt;
corner, forming an "X"&lt;BR /&gt;
&lt;BR /&gt;
That's it. It would be great if I could further automate it so that it could&lt;BR /&gt;
accept multiple rectangles and then fill each one of them in sequence. This&lt;BR /&gt;
sounds weird I'm sure, but it's something I have to do on a VERY repetivie&lt;BR /&gt;
basis, and it would be great to automate.&lt;BR /&gt;
&lt;BR /&gt;
I did some VBA coding for Excel years ago, but I am basically clueless on&lt;BR /&gt;
where to start here. Thanks  very much for your help!&lt;BR /&gt;
&lt;BR /&gt;
-C&lt;/CCHRISTIAN&gt;</description>
      <pubDate>Tue, 05 Jun 2007 20:45:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/simple-automated-line-drawing/m-p/1986577#M24998</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-06-05T20:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Simple automated line drawing</title>
      <link>https://forums.autodesk.com/t5/vba-forum/simple-automated-line-drawing/m-p/1986578#M24999</link>
      <description>Try this one&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Wed, 06 Jun 2007 08:31:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/simple-automated-line-drawing/m-p/1986578#M24999</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-06-06T08:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Simple automated line drawing</title>
      <link>https://forums.autodesk.com/t5/vba-forum/simple-automated-line-drawing/m-p/1986579#M25000</link>
      <description>Here's some code that ~'J'~ helped me with that I converted to do what &lt;BR /&gt;
you're asking for in vlisp if you can use that.</description>
      <pubDate>Wed, 06 Jun 2007 14:55:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/simple-automated-line-drawing/m-p/1986579#M25000</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-06-06T14:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Simple automated line drawing</title>
      <link>https://forums.autodesk.com/t5/vba-forum/simple-automated-line-drawing/m-p/1986580#M25001</link>
      <description>Thanks a lot folks, I'll look at this stuff over the weekend. Much &lt;BR /&gt;
appreciated!&lt;BR /&gt;
&lt;BR /&gt;
-C&lt;BR /&gt;
&lt;BR /&gt;
&lt;FATTY&gt; wrote in message news:5617595@discussion.autodesk.com...&lt;BR /&gt;
Try this one&lt;BR /&gt;
&lt;BR /&gt;
~'J'~&lt;/FATTY&gt;</description>
      <pubDate>Wed, 06 Jun 2007 20:08:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/simple-automated-line-drawing/m-p/1986580#M25001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-06-06T20:08:26Z</dc:date>
    </item>
  </channel>
</rss>

