Method AddFlipAction
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
AddFlipAction(DxfBlockFlipParameter, IEnumerable<DxfEntity>)
Gives the block a flip action tied to a flip parameter of it, AutoCAD's Flip action as its Block Editor makes one: the entities are mirrored about the parameter's reflection line where the parameter's state is 1, flipped.
public void AddFlipAction(DxfBlockFlipParameter parameter, IEnumerable<DxfEntity> entities)
Parameters
parameterDxfBlockFlipParameterThe flip parameter of this block the action follows.
entitiesIEnumerable<DxfEntity>The entities of the block to flip.
Remarks
A door leaf from (0, 0) to (90, 0) whose Hand runs along the y axis runs from (0, 0) to (-90, 0) as Hand is set to 1, and back as it is set to 0. The mirror is taken in the block's plane, about the vertical plane through the line. The action is written as AutoCAD saved the flip of ACadSharp's sample: the entities it flips, its connections Flip, UpdatedFlip, UpdatedBase and UpdatedEnd; its element named Flip1 after the parameter's Flip. An entity given twice is taken once. A block of flip actions has no stretch, move, scale, rotate or array action, and its flip parameter no other parameter beside it (AddFlipParameter(string, string, GeoPoint3, GeoPoint3)): AutoCAD 2021 stretched a flipped panel from where its last flip left it (plugin v20), and did not flip an INSERT of a block of a flip beside another parameter, reading Hand back as 0 (plugins v20b and v21, 24d-i and 24e-h), though it flipped one of the block of the flip alone (24d-g). A locked attribute definition whose words the drawing's FontSearchPath measures is flipped as AutoCAD 2021 flips it, kept readable, upright and turned as before, its INSERTs' ATTRIBs moved with it (check F1b): one aligned right, aligned or fitted on its baseline so that its first point is its second mirrored; one held by the middle of its words so that its second point is mirrored; any other so that the box of its ink is mirrored, "L1" of txt.shx 5 high at (20, 60, 0), its ink 6.67 wide, about x = 45 at (63.33, 60, 0).
Exceptions
- ArgumentNullException
Thrown when the parameter, the entities or one of them is null.
- ArgumentException
Thrown as AddMoveAction(DxfBlockLinearParameter, IEnumerable<DxfEntity>) says, and when an entity is an attribute definition whose words the drawing's fonts do not measure, locked or not. Nothing is written then.
- InvalidOperationException
Thrown when the block cannot be dynamic, as AddLinearParameter(string, string, GeoPoint3, GeoPoint3, double, DxfBlockParameterValueSet) says.
- NotSupportedException
Thrown when the block has a stretch, polar stretch, move, scale, rotate or array action. Nothing is written then.