![]() |
【转帖】equal block
equal block
equal block hi, how can i know if two blocks are equals? thank you. could you describe your problem in more details? sergey slezkin blocks equals hi, sorry if i explain badly. i would like to know if the entities oddbblocktablerecord's are the same to another entities oddbblocktablerecord's. i need to know this becouse i want to assert if it's defined two blocks with the same name block then this are equals. thank you. two blocks with the same name can't be created (eduplicaterecordname exception will be thrown while adding the second block to block table). except anonymous blocks. where is no method in dd to compare contents of 2 blocks - you'll need to iterate through both block table records and compare entities "manually". but it's absolutely legal situation if user defines 2 blocks with different names and the same contents. sergey slezkin quote: originally posted by sergey slezkin two blocks with the same name can't be created (eduplicaterecordname exception will be thrown while adding the second block to block table). except anonymous blocks. where is no method in dd to compare contents of 2 blocks - you'll need to iterate through both block table records and compare entities "manually". but it's absolutely legal situation if user defines 2 blocks with different names and the same contents. my problem is if user define 2 blocks with different contents and the same name and i would like to know when this situation exists. second block with the same name can't be added to the block table - exception edublicaterecordname will be thrown. sergey slezkin hi gabriel, i try to describe a block in autocad: (1) autocad stores all blocks in the blocktable as a unique blockrecord. the blockrecord has an unique name also. if you define a block(record) with via the commandprompt (block / wblock), you must give a blockname. autocad put a warning, if this blockname exist and override the blockrecord with the new definition. (2) for example in the model- or paperspace you can put a block via the command insert. and here is the trouble for understanding: this "insert" block is only a blockreference of the blockrecord. a blockreference is the same as a pointer in programming. so you can't define a blockrecord with the same name twice in blocktable. __________ ralph |
所有的时间均为北京时间。 现在的时间是 11:22 PM. |