Don't you find it tedious to get a reference to the Acad-Object, the ActiveDocument, and Modelspace every time you want to creat an entity? I use the ZF_Get-* functions to save alot of typing. It caches the object in a variable that it can return instead of getting a new reference every time. It's faster and I've never had a problem...until now.
Concerning releasing the object after the GetInterfaceObject: that is a good point. I always made a habit of it when getinng an instance of Excel of other APIs, but I kinda forgot that AutoCAD.AcCmColor.16 is another API. I guess I should write a subroutine that releases the color object stored in zf_AcadColor and set it to nil, so the next call to (ZF_Get-AcadColor) has to get a new instance every time.
it would look like this:
(VLA-Put-TrueColor oEntity (GetColor iColor))
(ReleaseColor)
It might be a good idea to wait on releasing the color untill the end of processing alot of entities, since getting an interface object if kinda slow. What do you folks think?
good stuff, I learned alot today.