My Photo

Search


  • Search 280+ postings

Site Awards



Syndications for this Site


Traveling to Autodesk in California - Day 5 & 6

Both of my last days in San Rafael were very fast paced and at times hard to absorb all of the information. These last couple of days in the Advanced ObjectARX class dealt a lot with COM. I really haven't done much in the shape and form of COM in the past as I just didn't need to with the things that I work on. I see the benefits of the COM wrapping of custom objects and creating custom Tools for the Tool Palette Window, but like anything it will take a little bit of practice, trial/error and some long hours.

I also spent lunch on Thursday with some of the folks at Autodesk, we went out to a pretty good place for Chinese food. Later that day, after I got out of class I walked down the hill from the Coppertop building to the Civic North and South buildings where more of the Autodesk employees work. I think there is a total of four buildings with in about a couple blocks from each other. Shaan Hurley, gave me a tour of the building and I was able to meet many of the people that I have talked to on the phone or in the Autodesk forums. The atmosphere around the building was very up and positive wherever you turned.

Friday was my day to come back to Wisconsin... left the warmth west coast for the cold of the North Midwest. It would have been nice to spend a couple more days out there, but I had prior arrangements to head to Chicago on Monday and Tuesday.

Thanks to everyone that I met at Autodesk for a great time. The ObjectARX training was great and very informative.

Sincerely,
  Lee

Traveling to Autodesk in California - Day 4

Day four of my traveling in San Rafael and ObjectARX training was a great day. The first couple days of class focused on the basics of using ObjectARX and how it connected to AutoCAD. The third day or day four of my traveling the class focused on creating custom objects that were both graphical and non-graphical. Of course when you create custom objects you need to learn how to work with ObjectDBX and filing the information for the object in and out. This was a very interesting day as I never really got into creating custom objects before. They do have their pluses, but also contain negatives as well. It will take me sometime to get use to using this new found skill like anything new, it takes time to absorb it and apply it.

Day five we willing be taking a look at COM objects and wrapping the new object that we created in class so it can be accessed in the Properties Palette and be used by other languages like VBA. With COM support it allows others to use your object in their drawings and their tools.

Sincerely,
  Lee

Creating a Selection Set Using ObjectARX

I showed in an earlier posting how a Selection Set can be created using LISP. In LISP there are many things that you don't have to worry about when using it as a customization and programming language with AutoCAD. For many this is enough to do what they want, but when you can't quite do what you want toy have to move to another level. For many the next level would be VBA and it will work very well for what most want to do. I have written many things in VBA that work very well for the tasks that they were designed for. Even with VBA, there are still some things that you just can't do or you need to perform things at a faster pace. This is where ObjectARX comes into play, the development platform of choice by Autodesk when writing their vertical applications. Anything is possible with ObjectARX as it uses C++. Enough with that... I just started off want to show a sample code difference between LISP and ObjectARX and then it turned into an explanation of the evolution of programming choices. Not like it is a bad thing, but onto the code sample now.


// Set a Variable for an Entity Name and Point
ads_name sset;
ads_point pt;
pt[X] = 1;
pt[Y] = 1;

acedSSGet(NULL, pt, NULL, NULL, sset);

long len = 0;
acedSSLength(sset, &len);

acutPrintf("\nNumber of objects selected: %i", len);
acedSSFree(sset);


The sample shows how to select objects at single point and in this case the point is 1,1. It performs the same tasks that were shown in the LISP example of selecting objects and then printing out the number of objects at the Command Line. If you have any questions please let me know. I will put together a VBA example that shows using a selection set as well in the near future.

Sincerely,
  Lee

Traveling to Autodesk in California - Day 3

Tuesday turned out to be another long day after trying to recover from a lack of sleep. In the class we talked about working with objects in the drawing database along with the symbols tables. So we created a couple commands and utilities that check for a layer & block record in the drawing and if they are not present then create them. Along with creating objects and references in the Symbol tables we looked at working with named dictionaries and how non-graphical information can be stored. This is how information for Layouts, Groups and some other features in AutoCAD work. We started talking about Hard/Soft Ownerships and Hard/Soft Pointers and how they work and the purpose they serve.

Pointers and Ownerships have been a somewhat unclear area for a little while. It is actually starting to make more sense now. The Pointers and Ownerships are handled differently based on the type of cloning operation used which happens during a Copy, CopyClip or Wblock Operation. The two types of cloning are Deepclone and Wblockclone. I have used Deepclone in the past to duplicate block table records.

Next, Wednesday), we will be talking about Custom objects and how they are stored in the drawing file. Custom objects can exist as either a non-graphical or a graphical object with in the drawing database.

Sincerely,
  Lee

Traveling to Autodesk in California - Day 2

Monday was my first ObjectARX class here in San Rafael. I have been programming with C++ for a little over 4 years and ObjectARX for the same amount of time. It is great to be in a class to help fill in the small gaps that I have added for many years. Sometimes the smallest of hits and ideas can help to make programming so much easier, especially when it comes to ObjectARX.

On Monday, they covered how ObjectARX hooks into AutoCAD. Then once we started doing labs we covered sending messages to the Command Line with the first tutorial, and it was the famous "Hello World!!" message. I don't think I have ever sat in a programming course that didn't use this type of example for the first tutorial.

Then we started getting into more of the user input functionality with using many of the AcEd functions like acedGetString, acedGetPoint, acedSSGet and many others. I will post later today or tomorrow a sample of getting a selection set using LISP, ObjectARX and maybe VBA to show the differences between the languages.

I also got to meet some of the great folks here at Autodesk and had a length conversation about Tuesday’s topics and how I implemented much of that functionality into my current applications already. Later last night I went out for supper with Shaan Hurley from Autodesk, which I consider to be a great friend of mine. He sure knows AutoCAD as being a member of Autodesk and a former customer back up until the R13 days. He also host a Web Log called Between the Lines.

Today we are going to be taking a look at the AutoCAD Drawing database structure through the APIs and how to work with entities.

Sincerely,
  Lee

Traveling to Autodesk in California - Day 1

After, many years of programming with ObjectARX and learning on my own. It was time to learn from the folks directly at Autodesk. I flew into San Francisco airport late Sunday night around 11:15 PM. By the time I got my luggage and rental car it was about 12:00 AM. Then the real fun began with searching out my hotel with was about 30 miles from the airport. What should have taken roughly 40 minutes turned into about 90 minutes of driving this way and that way? Over there and back here... I did make it eventually though. Thank goodness the hotel was right across the street from the Autodesk Coppertop building that allowed me to sleep longer.

I did have one problem outside of getting here and that seems to be my camera is not making the best sound when zooming in and out. Looks like I might be using that extended warranty after all. I will take pictures and post them as long as I still have a functional camera. I am hoping it will last all week long, until I get home.

Sincerely,
  Lee

Background Mask Tools for AutoCAD 2005 (Beta 2 Release)

Beta 2 of the Background Mask tools has been uploaded. If you are a user of the first Beta you will want to take a little bit of time to look at the command line as some things have changed. The main notice will be objects or Dimension Style first and then options.The command lines have been cleaned up to show the option Remove only for the commands DIMMASK and -DIMMASK. A new command called MASKHELP has also been introduced which will launch your default browser and go to the internet to access an online page.

Click here to download the Background Mask Tool.
Click here to access the on-line help for the Background Mask Tools.

I am going to complete some additional testing and will post the final version next week. If you have comments on the program just let me know.

Sincerely,
  Lee

Interesting response to the Background Mask Tools

What turned out to be a weekend project originally turned out to be something more. It seems that there are quite a few people that are using the new Background Mask feature with AutoCAD 2005 or they are sure interested in start. There has been a larger demand for a set of tools that I had thought in this area. Now for those that have tried the tools and found them to help with using the Background Mask feature I am working on what will be the next Beta release. Like I had mentioned earlier I didn't plan on the amount of people looking for such a tool so I figure I should make some changes so it looks more like a standard AutoCAD command.

Beta 2 will have the following changes:

-DimStyleMask
  * The prompts will be flipped asking for a Dimension Style first and then a color. It made no sense to ask for a color if you don't have a valid Dimension Name.
  * The color prompt will retain the last used color or selection. Pressing the Enter key will accept the previous value. This may change to the current Fill Color for the Dimension Style, but I am not sure yet.

-DimMask & DimMask
  * The prompts will be flipped asking for a Selection first and then a color. It made no sense to ask for a color if you don't have a valid Dimension Name. The commands will also support PickFirst which they do today, but it seems a little awkward.
  * The color prompt will retain the last used color or selection. Pressing the Enter key will accept the previous value.

-MtextMask & MtextMask
  * The prompts will be flipped asking for a Selection first and then a color. It made no sense to ask for a color if you don't have a valid Dimension Name. The commands will also support PickFirst which they do today, but it seems a little awkward.
  * The color prompt will retain the last used color or selection. Pressing the Enter key will accept the previous value.
  * Support will be added for Border Offset/Background Scale Factor. A prompt will be available for you to specify Offset or Color versus the current Color prompt. If you select Color then you will get the choices that are in the command today.

I am hoping that Beta2 will be ready by ends week.

If you have any comments on the commands please feel free to share by adding comments here or e-mail them to me.

Sincerely,
  Lee

Background Mask Tools for AutoCAD 2005 (Beta Release)

After a couple weeks of playing around and some help from others I have developed a Beta version of the Background Mask Tools that can be used with AutoCAD 2005. I have only tested these tools with AutoCAD 2005 and none of the verticals. So if you are willing to give them a try with a vertical just let me know how they work. Anyways, what I am posting is a Beta release of the Background Mask tools that I have created.

These tools have been tested thoroughly, but there could be unknown issues with the tools. By downloading and running the tools you have agreed to no expressed warranty and the tools being provided AS-IS.

Click here to download the Mask Extender Tools

The commands that are contained in the file are as follows:
-DIMMASK - Allows you to apply and remove Background Masking for Dimensions from the command line

DIMMASK - Allows you to apply and remove Background Masking for Dimensions from the command line. Standard colors are selected though the Color dialog box.

-DIMSTYLEMASK - Allows you to apply and remove Background Masking for a Dimension Style from the command line

-MTEXTMASK - Allows you to apply and remove Background Masking for Mtext from the command line

MTEXTMASK - Allows you to apply and remove Background Masking for Mtext from the command line. Standard colors are selected though the Color dialog box.


Any feedback is welcome. This is the first version of these tools. The MtextMask commands will be expanded to include the option for Border Offset. Hope you enjoy the tools, but please remember to always test any add-ons and other third-party software in your drafting environment before rolling it out to many users at once.

Sincerely,
  Lee

Feeds


  • Between the Lines Blog

  • Will render for food... Digital Media Blog

  • HyperPics.com