1) Identify an opportunity
Sometimes, the opportunity lies in some scripted application
use by a handful of designers and drafters.
For this discussion, we will look at how
Geo-Referenced Image
came to existence.
Civil engineering sometimes requires building large infrastructure.
In order to place the buildings in context, a map can be laid out on a drawing.
The drawing also contains the buildings. By overlaying the two, a clear picture
emerges.
Geographic or topological maps are tied to precise geographic coordinates. By
combining the pictures with the geographic information, it is possible to import
these images into a drawing and position them precisely with respect to one another
and to the drawing.
Images exist in various formats and the geographic information can be defined
in many ways. All of which can be dealt manually, but automation is always better.
For instance, there is less risk of making a mistake and less training is required
to achieve the same job.
|
2) Design a solution
We first need to figure out the commands in AutoCAD® to achieve the job
manually. For example, we have the following snippet:
(initdia 1)
(command "_.-image"
"_A" DWG_imgFILE (strcat geo_ULX "," geo_LRY)
"" ""
)
;;[...]
;; Some measurements
;;[...]
(command "_.scale"
(entlast) "" (strcat geo_ULX "," geo_LRY)
final_ScaleValue
)
Now that we know how to do the job, we can take a look at what capability is
desirable. For instance:
- Batch insertion
- Support for frequently used image formats
- Support for frequently used geographic information formats
- Some browsing capability
|