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
I want to use two point to get the text of the area,like this acedSSGet("C",Pointlist,NULL,NULL,SS).But I get zero object.I'am sure the text is in the area.
Posted by: ethan | Wednesday, June 06, 2007 at 09:55 PM