@OrmArTHe a écrit :
> You cannot change an entity in a block reference (except attribute references), you have to change it in the block definition and doing so will affect all inserted references.
What changes should I make to block definition so that Mtext doesn't move to location 1?
Sorry if I was not clear. What you're asking is not possible, any tranformation to a block reference will affect all the displayed entities (with an exception for attributes)
.
You should learn how AutoCAD blocks work (read this topic).
A block definition (BlockTableRecord) is a collection of entities. A block reference (BlockReference) does not contains entities, it is only a reference to the block definition with linear transformations (displacement, rotation and scaling) which affect all the displayed entities.
Only the attributes work a little differently. The block definition may contain attribute definitions (AttributeDefinition) and, as shown in another of your posts, when creating a new BlockReference by code, we have to explicitly create an attribute reference in the block reference AttributeCollection for each AttributeDefinition in the block definition. This is why, unlike other entities, attribute references may be slightly different from their attribute definition (position, text string).
In your case, you should replace the MText (/) with a Constant attribute definition and add it to the selection set of the action of Position1 parameter so that it can be displaced with other attributes.