aaryan 发表于 2022-7-6 07:14:41

Entmake / Vla-insert Which one

Hi All,
 
I have a routine which imports block with attributes from text file (XYZ file) with the standard autocad command (eg. "command "_insert" ...).
I have been given a text file to import which is very huge around 2lacs points in it and the above method was taking ages so I modified the code and used the vla-insert method function written by Alan J. Thompson.
The first method took 5 hours and the second one took around 2-2.5 hours.
I doubt if entmake make me of any help.
I need help if anyone can tell any other way to import blocks faster.
 
Thanks and Best Regards
Aaryan

Lee Mac 发表于 2022-7-6 08:21:07

entmake is generally the fastest method when generating new entities in the drawing, since you are directly modifying the drawing database. However, where attributed blocks are concerned, note that you will need to create the ATTRIB entities separately following creation of the INSERT entity (furthermore, you would also need to calculate the position of each ATTRIB entity relative to the position, scale, rotation and orientation of the INSERT entity, based on the relative position of the ATTDEF entity in the block definition), and then finally creating the terminating SEQEND entity; so these extra steps may detract from performance.
页: [1]
查看完整版本: Entmake / Vla-insert Which one