<?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 Inserting Blocks Using Delphi - Tony? in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/inserting-blocks-using-delphi-tony/m-p/343020#M98036</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've used Delphi extensively (thanks to Tony T.) and up to this point have&lt;BR /&gt;
not had the need to insert a block.  I'm using AutoCAD r14.01.  I don' t&lt;BR /&gt;
want to insert a drawing file since I like my applications to be self&lt;BR /&gt;
sufficient when possible.  I'm actually checking the block table to see if&lt;BR /&gt;
it exists, if not the block is created. Up to this point everything works&lt;BR /&gt;
great.  I've checked to see that the block definition was created and was&lt;BR /&gt;
able to insert the block using the insert command.&lt;BR /&gt;
&lt;BR /&gt;
Where I run into problems is when I call the InsertBlock() method.  I don't&lt;BR /&gt;
get an error but the block is not inserted and there is a message displayed&lt;BR /&gt;
everytime the method is called "Invalid Complex Object" or something to that&lt;BR /&gt;
effect.&lt;BR /&gt;
&lt;BR /&gt;
I don't have the code with me but after having creating a successful block&lt;BR /&gt;
definition I call the following:&lt;BR /&gt;
&lt;BR /&gt;
var&lt;BR /&gt;
pt1 : OleVariant;</description>
    <pubDate>Sat, 04 Dec 1999 08:49:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>1999-12-04T08:49:42Z</dc:date>
    <item>
      <title>Inserting Blocks Using Delphi - Tony?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/inserting-blocks-using-delphi-tony/m-p/343020#M98036</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've used Delphi extensively (thanks to Tony T.) and up to this point have&lt;BR /&gt;
not had the need to insert a block.  I'm using AutoCAD r14.01.  I don' t&lt;BR /&gt;
want to insert a drawing file since I like my applications to be self&lt;BR /&gt;
sufficient when possible.  I'm actually checking the block table to see if&lt;BR /&gt;
it exists, if not the block is created. Up to this point everything works&lt;BR /&gt;
great.  I've checked to see that the block definition was created and was&lt;BR /&gt;
able to insert the block using the insert command.&lt;BR /&gt;
&lt;BR /&gt;
Where I run into problems is when I call the InsertBlock() method.  I don't&lt;BR /&gt;
get an error but the block is not inserted and there is a message displayed&lt;BR /&gt;
everytime the method is called "Invalid Complex Object" or something to that&lt;BR /&gt;
effect.&lt;BR /&gt;
&lt;BR /&gt;
I don't have the code with me but after having creating a successful block&lt;BR /&gt;
definition I call the following:&lt;BR /&gt;
&lt;BR /&gt;
var&lt;BR /&gt;
pt1 : OleVariant;</description>
      <pubDate>Sat, 04 Dec 1999 08:49:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/inserting-blocks-using-delphi-tony/m-p/343020#M98036</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-12-04T08:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Blocks Using Delphi - Tony?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/inserting-blocks-using-delphi-tony/m-p/343021#M98037</link>
      <description>Hugo,&lt;BR /&gt;
&lt;BR /&gt;
Do you really want to insert your block in another one&lt;BR /&gt;
(nested block). In this case you won't see it immediately&lt;BR /&gt;
unless the BlockEnt is referenced to *ModelSpace or&lt;BR /&gt;
*PaperSpace. Naturally you cannot insert a block in&lt;BR /&gt;
its own definition. I haven't checked this but it may result&lt;BR /&gt;
in an "Invalid Complex Block".&lt;BR /&gt;
&lt;BR /&gt;
If you just need to insert your block in ModelSpace try to&lt;BR /&gt;
replace your BlockEnt with the ModelSpace object.&lt;BR /&gt;
&lt;BR /&gt;
Denis&lt;BR /&gt;
&lt;BR /&gt;
Hugo Guerrero a écrit dans le message&lt;BR /&gt;
&amp;lt;82ak09$8p92@adesknews2.autodesk.com&amp;gt;...&lt;BR /&gt;
&amp;gt;Hi,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;I've used Delphi extensively (thanks to Tony T.) and up to this point have&lt;BR /&gt;
&amp;gt;not had the need to insert a block.  I'm using AutoCAD r14.01.  I don' t&lt;BR /&gt;
&amp;gt;want to insert a drawing file since I like my applications to be self&lt;BR /&gt;
&amp;gt;sufficient when possible.  I'm actually checking the block table to see if&lt;BR /&gt;
&amp;gt;it exists, if not the block is created. Up to this point everything works&lt;BR /&gt;
&amp;gt;great.  I've checked to see that the block definition was created and was&lt;BR /&gt;
&amp;gt;able to insert the block using the insert command.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;Where I run into problems is when I call the InsertBlock() method.  I don't&lt;BR /&gt;
&amp;gt;get an error but the block is not inserted and there is a message displayed&lt;BR /&gt;
&amp;gt;everytime the method is called "Invalid Complex Object" or something to&lt;BR /&gt;
that&lt;BR /&gt;
&amp;gt;effect.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;I don't have the code with me but after having creating a successful block&lt;BR /&gt;
&amp;gt;definition I call the following:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;var&lt;BR /&gt;
&amp;gt;pt1 : OleVariant;&lt;BR /&gt;
&amp;gt;begin&lt;BR /&gt;
&amp;gt;pt1 := AcPoint(1,1,0);&lt;BR /&gt;
&amp;gt;BlockRef := BlockEnt.InsertBlock(pt1,'PT',1,1,0);&lt;BR /&gt;
&amp;gt;end;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;Any help is appreciated.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;Hugo&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;</description>
      <pubDate>Sun, 05 Dec 1999 14:12:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/inserting-blocks-using-delphi-tony/m-p/343021#M98037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-12-05T14:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Blocks Using Delphi - Tony?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/inserting-blocks-using-delphi-tony/m-p/343022#M98038</link>
      <description>Hugo - I can't guess what's going on in your code.&lt;BR /&gt;
&lt;BR /&gt;
If you can post it, I'll have a look. &lt;BR /&gt;
&lt;BR /&gt;
Hugo Guerrero wrote:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Hi,&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I've used Delphi extensively (thanks to Tony T.) and up to this point have&lt;BR /&gt;
&amp;gt; not had the need to insert a block.  I'm using AutoCAD r14.01.  I don' t&lt;BR /&gt;
&amp;gt; want to insert a drawing file since I like my applications to be self&lt;BR /&gt;
&amp;gt; sufficient when possible.  I'm actually checking the block table to see if&lt;BR /&gt;
&amp;gt; it exists, if not the block is created. Up to this point everything works&lt;BR /&gt;
&amp;gt; great.  I've checked to see that the block definition was created and was&lt;BR /&gt;
&amp;gt; able to insert the block using the insert command.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Where I run into problems is when I call the InsertBlock() method.  I don't&lt;BR /&gt;
&amp;gt; get an error but the block is not inserted and there is a message displayed&lt;BR /&gt;
&amp;gt; everytime the method is called "Invalid Complex Object" or something to that&lt;BR /&gt;
&amp;gt; effect.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I don't have the code with me but after having creating a successful block&lt;BR /&gt;
&amp;gt; definition I call the following:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; var&lt;BR /&gt;
&amp;gt; pt1 : OleVariant;&lt;BR /&gt;
&amp;gt; begin&lt;BR /&gt;
&amp;gt; pt1 := AcPoint(1,1,0);&lt;BR /&gt;
&amp;gt; BlockRef := BlockEnt.InsertBlock(pt1,'PT',1,1,0);&lt;BR /&gt;
&amp;gt; end;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Any help is appreciated.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Hugo&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
/*********************************************************/&lt;BR /&gt;
/*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
/* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
/* ----------------------------------------------------- */&lt;BR /&gt;
/*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
/*    http://ourworld.compuserve.com/homepages/tonyt     */&lt;BR /&gt;
/*********************************************************/</description>
      <pubDate>Sun, 05 Dec 1999 20:43:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/inserting-blocks-using-delphi-tony/m-p/343022#M98038</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>1999-12-05T20:43:46Z</dc:date>
    </item>
  </channel>
</rss>

