tag:blogger.com,1999:blog-49218544925972810292024-02-21T08:20:54.762-03:00ObjectARX® for Mac®This Blog is dedicated to ObjectARX programming inside Mac OSX platform.Fernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-4921854492597281029.post-36645915187796156012014-12-25T18:44:00.004-02:002014-12-25T18:44:57.624-02:00Hello,<br />
<br />
Here are my AU 2014 class material posted to Autodesk University website:<br />
<br />
<a href="http://au.autodesk.com/au-online/classes-on-demand/class-catalog/classes/year-2014/autocad/sd4865" style="border-bottom-color: rgb(119, 119, 119); border-bottom-style: dashed; border-width: 0px 0px 1px; color: #777777; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">SD4865 : AutoCAD, JavaScript, and the Cloud</a><br />
<a href="http://au.autodesk.com/au-online/classes-on-demand/class-catalog/classes/year-2014/autocad/sd4861" style="border-bottom-color: rgb(119, 119, 119); border-bottom-style: dashed; border-width: 0px 0px 1px; color: #777777; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">SD4861 : Creating AutoCAD Cross-Platform Plug-ins</a><br />
<a href="http://au.autodesk.com/au-online/classes-on-demand/class-catalog/classes/year-2014/revit-for-architects/sd4871" style="border-bottom-color: rgb(119, 119, 119); border-bottom-style: dashed; border-width: 0px 0px 1px; color: #777777; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;">SD4871 : CREATING PROFESSIONAL PLUG-INS FOR AUTODESK EXCHANGE STORE</a><br />
<div class="au-cs-result media bb3 pb-0-2 mb-0-2" style="border-bottom-color: rgb(218, 218, 218); border-bottom-style: dashed; border-width: 0px 0px 1px; color: #666666; font-family: FrutigerNextW04Regular, Calibri, Arial, sans-serif; font-size: 14px; line-height: 18px; margin: 0px 0px 8px; overflow: hidden; padding: 0px 0px 8px; vertical-align: baseline; zoom: 1;">
<div class="pt-0-2 pr-0-0" style="border: 0px; margin: 0px; padding: 8px 0px 0px; vertical-align: baseline;">
<a href="http://au.autodesk.com/au-online/classes-on-demand/class-catalog/classes/year-2014/revit-for-architects/sd4871" style="border-bottom-color: rgb(119, 119, 119); border-bottom-style: dashed; border-width: 0px 0px 1px; color: #777777; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;"></a><br />
<h5 class="mb-0-0" style="border: 0px; color: #222222; font-family: FrutigerNextW04Medium, Calibri, Arial, sans-serif; font-size: 0.857em; font-weight: normal; line-height: 1.25; margin: 0px; padding: 0px; text-transform: uppercase; vertical-align: baseline;">
<br /></h5>
<div>
Hope you enjoy!</div>
<div>
<br /></div>
<div>
Best regards.</div>
</div>
</div>
Fernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.com0tag:blogger.com,1999:blog-4921854492597281029.post-69444282728210271062011-04-13T15:49:00.003-03:002011-04-13T15:50:37.107-03:00AutoCAD Mac Development WebCastHello,<br />
<br />
My Autodesk friends Stephen Preston and Fenton Webb recorded a new WebCast about AutoCAD for Mac programming. It is an awesome startup for those who want to dig into AutoCAD Mac API.<br />
<br />
The video can be watched through the following link:<br />
<br />
<a href="http://download.autodesk.com/media/adn/ADN_DevCast_Episode_5/ADN_DevCast_Episode_5.html">ADN DevCast Episode 5</a><br />
<br />
Thank you Stephen and Fenton!<br />
<br />
Cheers!Fernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.com0tag:blogger.com,1999:blog-4921854492597281029.post-23925977728299094892011-04-13T15:46:00.001-03:002011-04-13T15:47:13.901-03:00AutoCAD Mac Update 2Autodesk have recently released Update 2 for AutoCAD Mac.<br />
I strongly suggest you to update your AutoCAD because it has several bug fixes and performance improvements.<br />
<br />
More details here:<br />
<br />
<a href="http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=16760244&linkID=15839491">AutoCAD 2011 for Mac Update 2</a><br />
<br />
Cheers!Fernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.com0tag:blogger.com,1999:blog-4921854492597281029.post-18893297057743480162010-12-21T16:53:00.000-02:002010-12-21T16:53:06.449-02:00AutoCAD Mac Update 1Hello,<br />
<br />
Autodesk has just released the first update for AutoCAD Mac 2011.<br />
AutoCAD Mac should warn you when you open it but if it doesn't, get it from the following web page:<br />
<br />
<a href="http://usa.autodesk.com/getdoc/id=DL16105699">AutoCAD Mac Update 1</a><br />
<br />
Regards.Fernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.com0tag:blogger.com,1999:blog-4921854492597281029.post-88529724958658208872010-11-03T18:42:00.008-02:002010-11-04T22:04:03.630-02:00An Introduction to Memory Management in Objective-C pt.2<p>Hello again!<br />In this follow-up I will explain the allocators and destructors available on Objective-C.</p><br /><h2>alloc</h2><br /><p><em>alloc</em> allocates memory for an object of a given class, but <strong>DOES NOT</strong> initialize this object. Usually, <em>alloc</em> comes together with some initializer like <em>initWithString</em> or simply <em>init</em>. For example:</p><br /><div class="codehilite"><pre><span class="n">NSString</span><span class="o">*</span> <span class="n">foo</span> <span class="o">=</span> <span class="p">[[</span><span class="n">NSString</span> <span class="n">alloc</span><span class="p">]</span> <span class="nl">initWithString:</span><span class="s">@"foo"</span><span class="p">];</span><br /></pre></div><br /><br /><br /><h2>new</h2><br /><p><em>new</em> is a convenience method equivalent to [[Class alloc] init]. This is not documented though, and was subject of a thread on cocoa-dev mailing list back in 2008. Bill Bumgarner, who is an Apple Software Engineer, <a href="http://lists.apple.com/archives/Cocoa-dev/2008/Feb/msg01374.html">explained it on the list</a>:</p><br /><blockquote><br /><p><em>Bill Bumgarner:</em><br />I just checked all the way back to 10.1. The implementation was +allocWithZone: NULL followed by -init until Leopard, when it moved to +alloc followed by -init.</p><br /></blockquote><br /><h2>copy</h2><br /><p>This is the keyword for the copy constructor. It allocates memory <em>and</em> initializes an object with the copy of the sender. Example:</p><br /><div class="codehilite"><pre><span class="n">NSString</span><span class="o">*</span> <span class="n">foo</span> <span class="o">=</span> <span class="p">[[</span><span class="n">NSString</span> <span class="n">alloc</span><span class="p">]</span> <span class="nl">initWithString:</span><span class="s">@"foo"</span><span class="p">];</span><br /><span class="n">NSString</span><span class="o">*</span> <span class="n">fooCopy</span> <span class="o">=</span> <span class="p">[</span><span class="n">foo</span> <span class="n">copy</span><span class="p">];</span> <span class="c1">// fooCopy == @"foo"</span><br /></pre></div><br /><br /><br /><p>A class must implement the <a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Protocols/NSCopying_Protocol/Reference/Reference.html">NSCopying Protocol</a> in order to use the copy constructor. This is accomplished by completing 2 steps:<br />1. Extend NSObject <NSCopying> instead of NSObject, for example.<br />2. Implement the copyWithZone method.</p><br /><div class="codehilite"><pre><span class="k">@interface</span> <span class="nc">MyClass</span> : <span class="nc">NSObject</span> <span class="o"><</span><span class="n">NSCopying</span><span class="o">></span><br /><span class="p">{</span><br /> <span class="n">NSString</span><span class="o">*</span> <span class="n">attribute_string</span><span class="p">;</span><br /><span class="p">}</span><br /><span class="k">@property</span><span class="p">(</span><span class="n">readwrite</span><span class="p">,</span><span class="n">copy</span><span class="p">)</span> <span class="n">NSString</span><span class="o">*</span> <span class="n">attribute_string</span><span class="p">;</span><br /><br /><span class="o">-</span> <span class="p">(</span><span class="kt">id</span><span class="p">)</span> <span class="nl">copyWithZone:</span><span class="p">(</span><span class="n">NSZone</span><span class="o">*</span><span class="p">)</span><span class="n">zone</span><span class="p">;</span><br /><br /><span class="k">@end</span><br /><br /><span class="k">@implementation</span> <span class="nc">MyClass</span><br /><br /><span class="k">@synthesize</span> <span class="n">attribute_string</span><span class="p">;</span><br /><br /><span class="o">-</span> <span class="p">(</span><span class="kt">id</span><span class="p">)</span> <span class="nl">copyWithZone:</span><span class="p">(</span><span class="n">NSZone</span><span class="o">*</span><span class="p">)</span><span class="n">zone</span> <span class="p">{</span><br /> <span class="n">MyClass</span><span class="o">*</span> <span class="n">copy</span> <span class="o">=</span> <span class="p">[</span><span class="n">super</span> <span class="nl">allocWithZone:</span><span class="n">zone</span><span class="p">];</span><br /><br /> <span class="n">copy</span><span class="p">.</span><span class="n">attribute_string</span> <span class="o">=</span> <span class="p">[</span><span class="n">self</span> <span class="n">attribute_string</span><span class="p">];</span><br /><br /> <span class="k">return</span> <span class="n">copy</span><span class="p">;</span><br /><span class="p">}</span><br /></pre></div><br /><br /><br /><p>Note: The implementation above uses @property and @synthesize just to handle the setters and getters. I am going to write a tutorial about properties later on, but for now just imagine that " copy.attribute_string = " is replaced by copy->setAttributeString(...), and setAttributeString is a public method that deals with the string copying and releasing.</p><br /><h2>retain</h2><br /><p><em>retain</em> is used to get ownership over a reference you didn't <em>allocate</em> yourself. A common usage of <em>retain</em> is to hold references of objects inside collections.</p><br /><p>Usually, core collections, like NSArray, NSDictionary and their mutable counterparts, release all objects once the container is released. This can create invalid references, if one needs to retain a reference to an object of the container for longer than the container itself. For example:</p><br /><div class="codehilite"><pre><span class="n">NSArray</span><span class="o">*</span> <span class="n">students</span> <span class="o">=</span> <span class="p">[[</span><span class="n">NSArray</span> <span class="n">alloc</span><span class="p">]</span> <span class="nl">initWithObjects:</span><span class="s">@"Alice"</span><span class="p">,</span><br /> <span class="s">@"Ben"</span><span class="p">,</span><br /> <span class="s">@"Chris"</span><span class="p">,</span> <br /> <span class="s">@"David"</span><span class="p">,</span><br /> <span class="nb">nil</span><span class="p">];</span><br /><span class="n">NSString</span><span class="o">*</span> <span class="n">studentName</span> <span class="o">=</span> <span class="p">[</span><span class="n">students</span> <span class="nl">objectAtIndex:</span><span class="mi">2</span><span class="p">];</span> <span class="c1">// @"Chris"</span><br /><span class="p">[</span><span class="n">students</span> <span class="n">release</span><span class="p">];</span><br /><span class="n">NSLog</span><span class="p">(</span><span class="s">@"Student no 2: %@"</span><span class="p">,</span> <span class="n">studentName</span><span class="p">);</span> <br /> <span class="c1">// Error: studentName is an invalid pointer.</span><br /></pre></div><br /><br /><br /><p>To workaround this, one should retain the studentName reference before releasing the container, like this:</p><br /><div class="codehilite"><pre><span class="n">NSString</span><span class="o">*</span> <span class="n">studentName</span> <span class="o">=</span> <span class="p">[[</span><span class="n">students</span> <span class="nl">objectAtIndex:</span><span class="mi">2</span><span class="p">]</span> <span class="n">retain</span><span class="p">];</span><br /><span class="p">[</span><span class="n">students</span> <span class="n">release</span><span class="p">];</span><br /><span class="n">NSLog</span><span class="p">(</span><span class="s">@"Student no 2: %@"</span><span class="p">,</span> <span class="n">studentName</span><span class="p">);</span> <br /> <span class="c1">// prints "Student no 2: Chris" to console.</span><br /><br /><span class="p">[</span><span class="n">studentName</span> <span class="n">release</span><span class="p">];</span><br /></pre></div><br /><br /><br /><h2>release</h2><br /><p><em>release</em> relinquishes ownership of an object. It decrements the reference count to that object and if it gets to 0, then the object gets dealloc'd.</p><br /><p><a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmObjectOwnership.html#//apple_ref/doc/uid/20000043-DontLinkElementID_5">It is important to notice that one should never send a dealloc message directly</a>. Instead, objects should be released and the deallocation will happen automatically either by the OS or the memory management environment. </p><br /><h2>autorelease</h2><br /><p><em>autorelease</em> is a kind of lazy-release. When an object receives the autorelease message, the object ownership is transferred to the last created autorelease pool, thus extending the lifetime of the object and simplifying memory management.</p><br /><p>An <a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAutoreleasePools.html#//apple_ref/doc/uid/20000047-CJBFBEDI">autorelease pool</a> is a space where all references to objects that received an autorelease message are stored. When the pool is drained (same as deallocated), these references receive a release message and then gets deallocated.</p><br /><p>Therefore, there are 2 basic implications of using autorelease:<br /><em> Either use release or autorelease, and <strong>never</strong> both.<br /></em> Always make sure you have an autorelease pool created before you send an autorelease message, or Cocoa will log an error.</p><br /><p>Autorelease pools can be nested and are stored in a stack. This means that one can't extend the lifetime of an object, using autorelease, more than the last created pool's lifetime. Also, this mean that if you are not sure an autorelease pool was created, you should always create an autorelease pool before using autorelease.</p><br /><p>And finally, one should use autorelease when he needs to create an object inside a scope, that will be used outside this scope.</p><br /><p>For example:</p><br /><div class="codehilite"><pre><span class="c1">// arrayFactory.m</span><br /><span class="k">@implementation</span> <span class="nc">arrayFactory</span><br /><br /><span class="o">+</span> <span class="p">(</span><span class="n">NSArray</span><span class="o">*</span><span class="p">)</span> <span class="n">createArray</span> <span class="p">{</span><br /> <span class="n">NSArray</span><span class="o">*</span> <span class="n">newArray</span> <span class="o">=</span> <span class="p">[[</span><span class="n">NSArray</span> <span class="n">alloc</span><span class="p">]</span> <br /> <span class="nl">initWithObjects:</span><span class="s">@"a"</span><span class="p">,</span><span class="s">@"b"</span><span class="p">,</span><span class="s">@"c"</span><span class="p">,</span><span class="nb">nil</span><span class="p">];</span><br /> <span class="k">return</span> <span class="p">[</span><span class="n">newArray</span> <span class="n">autorelease</span><span class="p">];</span><br /><span class="p">}</span><br /><br /><span class="k">@end</span><br /><br /><span class="c1">// main.m</span><br /><span class="kt">int</span> <span class="n">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="kt">char</span> <span class="o">*</span><span class="n">argv</span><span class="p">[])</span><br /><span class="p">{</span><br /> <span class="n">NSAutoreleasePool</span><span class="o">*</span> <span class="n">pool</span> <span class="o">=</span> <span class="p">[[</span><span class="n">NSAutoreleasePool</span> <span class="n">alloc</span><span class="p">]</span> <span class="n">init</span><span class="p">];</span><br /><br /> <span class="n">NSArray</span><span class="o">*</span> <span class="n">myArray</span> <span class="o">=</span> <span class="p">[</span><span class="n">arrayFactory</span> <span class="n">createArray</span><span class="p">];</span><br /><br /> <span class="c1">// usage of myArray</span><br /><br /> <span class="p">[</span><span class="n">pool</span> <span class="n">drain</span><span class="p">];</span> <span class="c1">// releases myArray and its content.</span><br /> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span><br /><span class="p">}</span><br /></pre></div><br /><br /><br /><p>This is all one needs to know to be confident when dealing with memory management in Objective-C.</p><br /><p>I also recommend reading <a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html#//apple_ref/doc/uid/10000011-SW1">Apple's Developer Docs about Memory Management</a> for some advanced tips regarding performance and memory footprint.</p><br /><p>Until next time!</p>Pedro Barachohttp://www.blogger.com/profile/14723190787737385514noreply@blogger.com0tag:blogger.com,1999:blog-4921854492597281029.post-20256581712895074052010-10-30T03:27:00.001-02:002010-10-30T03:28:59.119-02:00An Introduction to Memory Management in Objective-C pt.1<p>Hello everyone! This is my first post on this blog and I hope you enjoy it.</p><br /><p>On this post I will introduce the concepts behind memory management in Objective-C. This will be the first of a serie of posts about memory management, where I intend to cover everything you need to know to be confident with pointers in Objective-C. :)</p><br /><h2>Ownership</h2><br /><p>To understand memory allocation in Objective-C, we must first understand <em>Ownership</em>. Ownership principle states that for each object one creates, one is the only responsible for destroying it. If one doesn't destroy it, then there will be a memory leak. And if someone else destroys it, then there will be bugs, crashes and all sorts of unexpected behaviors due to invalid references being used.</p><br /><p>In practice, the Ownership principle states that for each <strong>new</strong> there should be a <strong>delete</strong> on a C++ code, for example.</p><br /><p>This principle is implemented on compilers via reference counting. For each <em>allocator</em> call, the reference count of an object is incremented and for each <em>destructor</em> call this reference count is decremented. When the reference count reaches 0, the memory space is cleared and set as available for other allocations.</p><br /><p>In Objective-C, there are 4 keywords for allocators: <strong>alloc</strong>, <strong>new</strong>, <strong>copy</strong>, <strong>retain</strong> and 2 for destructors: <strong>release</strong> and <strong>autorelease</strong>.</p><br /><p>I will explain each one on the next post.</p><br /><p>Stay tuned for more!</p>Pedro Barachohttp://www.blogger.com/profile/14723190787737385514noreply@blogger.com0tag:blogger.com,1999:blog-4921854492597281029.post-72134594117754637782010-10-28T22:53:00.000-02:002010-10-28T22:53:20.154-02:00Lab1 VideoHello,<br />
<br />
This is the first Lab about ObjectARX for Mac programming. In this Lab you will learn how to create a new project inside XCode, how to compile and build it. At the end, you will learn how to debug the application using XCode debug tools.<br />
<br />
<object height="344" width="425"><param name="movie" value="http://www.youtube.com/v/los4uycOMJg?hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/los4uycOMJg?hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br />
<br />
If you have any problem watching the embedded video try the following link:<br />
<br />
<a href="http://www.youtube.com/watch?v=los4uycOMJg">YouTube Link</a><br />
<br />
Cheers!<br />
Fernando.Fernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.com0tag:blogger.com,1999:blog-4921854492597281029.post-51191840237989898142010-10-20T08:56:00.001-02:002010-10-20T09:17:47.921-02:00Behind the Scenes: Bringing AutoCAD® to the Mac®Hello,<br />
<br />
Here is a short video with some Autodesk people and some beta users talking about the challenges faced to develop AutoCAD for Mac.<br />
<br />
<a href="http://download.autodesk.com/us/autocadformac/autocad_for_mac_behind_scenes/autocad_for_mac_behind_scenes_636x406.html">Behind the Scenes: Bringing AutoCAD® to the Mac®</a><br />
<br />
I would like to thank you all Autodesk members for the effort and support helping us (OFCDesk) to accomplish our hard job to port <a href="http://www.ofcdesk.com/Products/HomeIDCforMAC.aspx">OFCDesk IDC</a> to the Mac platform.<br />
<br />
Regards.Fernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.com2tag:blogger.com,1999:blog-4921854492597281029.post-56253531758145797012010-10-18T16:44:00.000-02:002010-10-18T16:44:51.614-02:00ObjectARX® SDK for Mac® availableHello,<br />
<br />
Autodesk has just posted the very first release of ObjectARX for Mac. It can be downloaded from the ObjectARX official website:<br />
<br />
<a href="http://www.objectarx.com/">ObjectARX®</a><br />
<br />
The SDK is a dmg package which will install the necessary Header and Sample files into your Mac.<br />
<div class="separator" style="clear: both; text-align: center;"></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvEURi0jNXMeAhg25IqSayzoY84qgQMNfeXxpOZ0OA7QTxRDgRlPOV2ARN53KWxyUXyo3hlrG51sb8JOnIU5Q6M3fDGjjxgqhiGrwPL14T-7bkO0kepO7d6QcejqoZRzxwsUm46CYAdBQ/s1600/Screen+shot+2010-10-18+at+4.33.44+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="237" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvEURi0jNXMeAhg25IqSayzoY84qgQMNfeXxpOZ0OA7QTxRDgRlPOV2ARN53KWxyUXyo3hlrG51sb8JOnIU5Q6M3fDGjjxgqhiGrwPL14T-7bkO0kepO7d6QcejqoZRzxwsUm46CYAdBQ/s320/Screen+shot+2010-10-18+at+4.33.44+PM.png" width="320" /></a></div><br />
It will also create some XCode Project Templates which will create the ARX/DBX application skeleton.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioFbAdukxgLSgmgxXlg5GVskwUX9Lq3eprRuAu3j-7k2t2rFfx85-vD3r87RHNNANOkEpXJcO1dG7dE8G1w0moaDjwEXPDK-6Qa7l8apU69O2UvBOajscxRm_7E-kxTjvLnCedgC6Fwxg/s1600/Screen+shot+2010-10-18+at+4.34.49+PM.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioFbAdukxgLSgmgxXlg5GVskwUX9Lq3eprRuAu3j-7k2t2rFfx85-vD3r87RHNNANOkEpXJcO1dG7dE8G1w0moaDjwEXPDK-6Qa7l8apU69O2UvBOajscxRm_7E-kxTjvLnCedgC6Fwxg/s320/Screen+shot+2010-10-18+at+4.34.49+PM.png" width="320" /></a></div><br />
Once you run your XCode and start to create a new Project you will see two new Project templates. One is for a ARX Cocoa module and the other for a DBX module.<br />
<br />
<br />
<br />
The Template will initialize an empty dummy project with a basic command registered and ready to receive your code. On this first release, there are no Project Class wizards like you are used to have inside Visual Studio.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLQVBhQHVTRS8F0XC_0SpFeUBDl63NpXailjCF4qm7eAU8vG-JxeFk4rguE2kucl8gtcaskBHqQoWI__W0s-hXwKcCsJtoe5XeMJC36Tyhf91PDmsovDrDP8e13Dw36pfYEBmy6LahLek/s1600/Screen+shot+2010-10-18+at+4.35.55+PM.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLQVBhQHVTRS8F0XC_0SpFeUBDl63NpXailjCF4qm7eAU8vG-JxeFk4rguE2kucl8gtcaskBHqQoWI__W0s-hXwKcCsJtoe5XeMJC36Tyhf91PDmsovDrDP8e13Dw36pfYEBmy6LahLek/s320/Screen+shot+2010-10-18+at+4.35.55+PM.png" width="320" /></a></div><br />
<br />
There are also some online documentation available with a Developer Guide and also a Migration Guide:<br />
<br />
<a href="http://wikihelp.autodesk.com/Product_Help/AutoCADforMac/Developer_Documentation">Developer Documentation</a><br />
<br />
The documentation is posted at Wiki style so it is very interactive with rich content like Videos.<br />
<br />
<br />
<br />
<br />
<br />
Stay tuned because now I will be able to further explore this technology in details.<br />
<br />
For now, make sure your have your AutoCAD for Mac, XCode and ObjectARX for Mac installed into your OSX.<br />
<br />
Regards.Fernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.com0tag:blogger.com,1999:blog-4921854492597281029.post-38940419431455606232010-10-15T09:53:00.000-03:002010-10-15T09:53:18.988-03:00AutoCAD® for Mac® Trial availableHello,<br />
<br />
AutoCAD® for Mac® is now available for download as a 30-day Trial.<br />
<br />
<a href="http://www.autodesk.com/autocadformac">Download now</a><br />
<br />
I strongly suggest you go ahead and start to playing with it. As soon as the ObjectARX for Mac SDK is made available for downloading I will start to post more articles about AutoCAD for Mac programming.<br />
<br />
Stay tuned!Fernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.com0tag:blogger.com,1999:blog-4921854492597281029.post-62868933724206406152010-10-12T21:34:00.000-03:002010-10-12T21:34:33.902-03:00XCode 3 versus 4<span style="font-family: Verdana, sans-serif;">Hello,</span><br />
<br />
<span style="font-family: Verdana, sans-serif;">One of disadvantages from those who are migrating from Windows environment to Mac OSX is the new compiler tool. XCode is really good but Visual Studio has been the best IDE for a long time.</span><br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg1F8282zOVW-Vhj6ZPKxok-y38MFdkKOC39VHrJVUCbWe3IaAhANhdwfUbXAfN2JjVJiF9cpMMPy0BIGg6yVCfQ7EoD7vVEfC_RaJkpAK6vhvp0_y8w104tNqSMwMjLBTKcooUk5jujE/s1600/XCode3IDE.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg1F8282zOVW-Vhj6ZPKxok-y38MFdkKOC39VHrJVUCbWe3IaAhANhdwfUbXAfN2JjVJiF9cpMMPy0BIGg6yVCfQ7EoD7vVEfC_RaJkpAK6vhvp0_y8w104tNqSMwMjLBTKcooUk5jujE/s320/XCode3IDE.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">XCode 3.2 IDE</td></tr>
</tbody></table><span style="font-family: Verdana, sans-serif;">Apple just released a Preview version of XCode 4 which presents several new tools and benefits but one of them captured my attention: "XCode Workspace". Yes, the current version does not provide an integrated environment equivalent to Visual Studio Solution.</span><br />
<span style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span style="font-family: Verdana, sans-serif;">For those who create simple applications with one or two modules it is not a big deal but for those who have to deal with 5 or 10 projects at once with dependencies among them it would be a pain!</span><br />
<span style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span style="font-family: Verdana, sans-serif;">Actually XCode 3 provides a special window called "Organizer" which allow you to kind of have all projects placed together but with a not well clear working behavior.</span><br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitUgL-ImiU6MBJulpgEb5jw51ZP6Ahe4V2VTVSLgfplk1oSdb4ML8CMppxHwPDAxgpP05cg5LShOZk5ur3i_nmG6TBsshYzlJiPdZ_KdZHsZDthmwO9-YwM_NO427pv8vQ3eIYEP7cM9A/s1600/XCodeOrganizer.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitUgL-ImiU6MBJulpgEb5jw51ZP6Ahe4V2VTVSLgfplk1oSdb4ML8CMppxHwPDAxgpP05cg5LShOZk5ur3i_nmG6TBsshYzlJiPdZ_KdZHsZDthmwO9-YwM_NO427pv8vQ3eIYEP7cM9A/s320/XCodeOrganizer.png" width="227" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">XCode 3.2 Organizer</td></tr>
</tbody></table><span style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">I think XCode 4 with this specific Workspace feature plus all the other major improvements will really make the difference for those coming from Visual Studio and will make their lives much easier.</span><br />
<span style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span style="font-family: Verdana, sans-serif;">Autodesk didn't confirm yet if ObjectARX for Mac will be compatible with XCode 4 neither if it will be capable of generating compatible binaries.</span><br />
<span style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span style="font-family: Verdana, sans-serif;">More information about XCode 4 Preview can be found here: </span><br />
<span style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span style="font-family: Verdana, sans-serif;"><a href="http://developer.apple.com/technologies/tools/whats-new.html">XCode 4 Preview</a></span><br />
<span style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span style="font-family: Verdana, sans-serif;">On the next post I will talk more about Targets and how they can make your life easier.</span><br />
<span style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span style="font-family: Verdana, sans-serif;">Stay tuned.</span><br />
<span style="font-family: Verdana, sans-serif;"><br />
</span><br />
<span style="font-family: Verdana, sans-serif;"><br />
</span>Fernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.com0tag:blogger.com,1999:blog-4921854492597281029.post-20114719908178901842010-09-16T21:41:00.000-03:002010-09-16T21:41:05.256-03:00A word about OSX bundlesHello,<br />
<br />
One of the new concepts you will need to understand to work with applications inside OSX is how they can be organized. Inside Microsoft Windows we are used to have a host aplication executable and several other modules spreaded out into system known folders. Further, if we consider also .NET framework, we need to also consider the GAC.<br />
<br />
In other hand, most of OSX applications are organized as bundles. A more detailed description of these structures (actually folders) is available here:<br />
<br />
<a href="http://en.wikipedia.org/wiki/Application_Bundle"><b>"Under NEXTSTEP, Mac OS X and GNUstep, a bundle is a directory (or file) that allows related resources such as software code to be grouped together. They were introduced into the Macintosh world as packages in Mac OS 9 and are similar in concept to the Application Directories used in RISC OS, on the ROX Desktop, as integrative technology into Ubuntu and Debian Linux with SpatialBundle, and on Super OS (RUNZ bundles)." - Wikipedia</b></a><br />
<br />
Basically the concept is pretty simple, the bundle is the host and all its modules, resources, control files, etc. should be placed inside it. You can have as many sub-folders you want and organize your files as you wish. This self contained environment is firstly very good to keep your application isolated and avoid unwanted modifications from third party applications. Of course OSX also support shared components like frameworks placed into other folders.<br />
<br />
If you get a typical OSX application, go to it using your Finder, right click and select "Show Package Contents" you will be able to see all its components (don't mess with them so your application may stop to work). So you may think bundles are folders with special behavior.<br />
<br />
This is why most of OSX applications can be uninstalled by just deleting the main application bundle. It will carry all components to the Trash.<br />
<br />
Ok, I don't want to go deeper than this but keep in mind that you will need to use bundle modules to organize your applications inside OSX.<br />
<br />
Cheers!!!Fernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.com2tag:blogger.com,1999:blog-4921854492597281029.post-26866045705767072402010-09-15T14:33:00.000-03:002010-09-15T14:33:27.159-03:00AutoCAD for Mac Announced<span style="font-family: Verdana, sans-serif;">Hello,</span><br />
<br />
<span style="font-family: Verdana;">Welcome to my new Blog dedicated exclusively to AutoCAD Mac ObjectARX programming. For those who are used with my current Blog "<a href="http://arxdummies.blogspot.com/">ObjectARX & Dummies</a>" I plan a slightly different approach here once we are dealing with a different platform.</span><br />
<br />
<span style="font-family: Verdana;">Meanwhile, I would recommend some news about AutoCAD Mac along with some teaser videos about it.</span><br />
<br />
<span style="font-family: Verdana, sans-serif;">AutoCAD for Mac was announced to be released this Fall:</span><br />
<br />
<a href="http://www.youtube.com/watch?v=Lt12QkM_FSQ"><span style="font-family: Verdana, sans-serif;">http://www.youtube.com/watch?v=Lt12QkM_FSQ</span></a><br />
<br />
<a href="http://www.autodesk.com/autocadformac"><span style="font-family: Verdana, sans-serif;">http://www.autodesk.com/autocadformac</span></a><br />
<br />
<span style="font-family: Verdana, sans-serif;">The event was last August 31st at Autodesk Gallery in San Francisco. I was there to present our company's (OFCDesk) product ported to AutoCAD Mac which will be made available also this Fall right after AutoCAD Mac starts to ship.</span><br />
<br />
<span style="font-family: Verdana, sans-serif;">Some interesting videos about it can be found here at AutoCAD Exchange Youtube channel:</span><br />
<br />
<a href="http://www.youtube.com/watch?v=3qyB_e8e3Zg"><span style="font-family: Verdana, sans-serif;">http://www.youtube.com/watch?v=3qyB_e8e3Zg</span></a><br />
<br />
<a href="http://www.youtube.com/watch?v=e2Vl9rUnC6g"><span style="font-family: Verdana, sans-serif;">http://www.youtube.com/watch?v=e2Vl9rUnC6g</span></a><br />
<br />
<a href="http://www.youtube.com/watch?v=hapdsyw8Ngs"><span style="font-family: Verdana, sans-serif;">http://www.youtube.com/watch?v=hapdsyw8Ngs</span></a><br />
<br />
<span style="font-family: Verdana, sans-serif;">Stay tuned on this Blog because I plan to cover all details about it in regards to API, how to create ObjectARX applications for it and how to port your current AutoCAD Windows applications to Mac.</span><br />
<br />
<span style="font-family: Verdana, sans-serif;">In advance, I would recommend a deep study on XCode compiler and Cocoa language.</span><br />
<br />
<span style="font-family: Verdana, sans-serif;">Cheers!</span>Fernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.com0