The invention relates to the technical field of
computer aided design, and discloses a DWG drawing framing method based on ObjectARX and GEO, and the method comprises the following steps: S1, DWG drawing data loading: reading a DWG drawing file through an ObjectARX interface, and obtaining electric
digital data in the DWG drawing file, including geometric elements of points, lines and surfaces and attribute information associated with the geometric elements; s2, framing parameter setting: receiving a preset framing parameter input or called by a user, wherein the framing parameter comprises a framing size, a framing mode, a framing area and a storage path and a naming rule of an output file. An AutoCAD underlying
data structure is directly operated by means of an ObjectARX interface, a redundant
data format conversion link in traditional framing is omitted, and
data transmission time consumption is reduced; the method has the advantages that by matching with an efficient space geometry operation
algorithm of a GEOS
library, core operations such as framing region matching and graphic object
cutting are quickly completed, compared with manual framing, the
processing period is greatly shortened, and the method is particularly suitable for large complex DWG drawing framing scenes containing massive geometric elements.