What is a hard-pointer (AutoCAD .net)!

_config.yml

Why this post: The ObjectARX Documentation is opaque; .net even worse

At times the ObjectARX uses all these arcane and abstruse terms, that only a few would know: where is the glossary definition for what a hard pointer reference is? Accordingly, having collected this knowledge from various posts, I will attempt to provide a precis where the documentation falls short. AutoDesk could save themselves a lot of effort by simply putting the documentation on GitHub and allowing the documentation users to themselves make pull requests. Microsoft have done this and accordingly have saved themselves a world of pain in terms of maintaining their documentation. But I digress.

What is a hard reference?

Suppose you have a block reference that is contained on the “PANELSEXP” layer. This means that in order for the block reference to dutifully do its duty, it needs a layer, and moreover, it needs to be on the PANELSEXP layer. So if the block reference has a hard refer to the PANELSEXP layer, then it cannot exist without it.

Futher Detail:

Hard references or pointers protect an object from being purged while soft references do not.

Consider a polyline and it’s vertices. If we should try to purge the vertices, we will not be able to, because the vertex is owned by the polyline.

Further questions to be answered

Here are some common questions which will be answered as I obtain further clarity on the subject:

  • Pointer vs Owner vs Reference
  • Hard vs Soft

Credits

This post was inspired by Adam Nagy’s post on the same topic.

Written on November 20, 2018