SketchBlockDefinition.OffsetSketchEntitiesUsingPoint Method
Parent Object: SketchBlockDefinitionDescription
Method that offsets a sketch entity or a group of end-to-end connected sketch entities. In both cases, the offset is first applied to the base sketch entity such that the offset of the base sketch entity passes through the specified offset point on the sketch. The shortest distance of this offset point from the original base sketch entity determines the offset distance.
Syntax
SketchBlockDefinition.OffsetSketchEntitiesUsingPoint( SketchEntities As ObjectCollection, OffsetPoint As Point2d, [IncludeConnectedEntities] As Boolean, [CreateOffsetConstraints] As Boolean ) As SketchEntitiesEnumeratorParameters
Name | Type | Description |
SketchEntities | ObjectCollection | ObjectCollection that specifies either a single sketch entity or a set of sketch entities that need to be offset. The collection can contain any SketchEntity object except SketchPoint because sketch points cannot be offset. The first entity in the collection is always treated as the base sketch entity. The offset distance (OffsetDistance argument) and the offset direction (NaturalOffsetDirection argument) apply to this base sketch entity. If only one sketch entity needs to be offset, then it should be specified as the only item in the collection and the IncludeConnectedEntities argument should be specified as False. Since the entity specified in the collection is the first and only item in the collection, it will be treated as the base sketch entity. If a group of end\-to\-end connected sketch entities need to be offset, then they can be specified using one of the following options\: * Specifying an exact set of sketch entities to offset. The collection can be used to specify an exact set of sketch entities that need to be offset. The objects in the collection must represent entities that are end-to-end connected and the collection must contain the objects in the order that they are connected. The first entity specified in the collection will be treated as the base sketch entity. * Specifying only the base sketch entity and automatically including connected entities. The base sketch entity should be specified as the only item in the collection. The IncludeConnectedEntities boolean argument should be specified as True to indicate that all entities that form a loop (open or closed) which contains the base sketch entity should be automatically included to be offset. Since only one of the above options to specify a group of connected entities can be used at the same time and not both, if the collection contains multiple entities, it implies that the collection is being used to explicitly specify an exact set of sketch entities to offset, in which case the IncludeConnectedEntities argument should be False. If True is specified, the method will fail and the sketch entities will not be offset. |
OffsetPoint | Point2d | Defines a point on the sketch through which the offset of the base sketch entity (the sketch entity specified by the first item in the SketchEntities collection) should pass. The shortest distance of this point from the base sketch entity is used to determine the offset distance. This offset distance will also be used to offset any other additional connected sketch entities. The location of the point with respect to the base sketch entity determines the position of the offset base sketch entity (i.e. the location of the point determines on which side of the base sketch entity the offset of the base sketch entity will be positioned). Once the offset distance and position for the offset of the base sketch entity are determined, this information is used to determine the position for all other connected sketch entities that need to be offset. Thus, the offset point provides sufficient information to calculate the offset distance as well as the offset direction for all the sketch entities that need to be offset. |
IncludeConnectedEntities | Boolean | Value that specifies whether all entities that form a loop containing the base sketch entity should also be offset. If True is specified, then all loop entities will be offset. But, if the sketch has multiple loops that contain the base sketch entity in which case it will not be possible to uniquely determine a single loop that needs to be offset, only the base sketch entity will be offset. If False is specified, then only the entities specified in the SketchEntities collection will be offset. If True is specified, the SketchEntities collection should contain only one item that corresponds to the base sketch entity, otherwise, if the SketchEntities collection contains multiple entities, then this method will fail and the sketch entities will not be offset. If False is specified, the SketchEntities collection can contain either a single item that corresponds to the base sketch entity or multiple items that correspond to a group of end\-to\-end connected entities. If the collection contains a single item that corresponds to the base sketch entity, then only this base sketch entity will be offset. On the other hand, if the collection contains multiple items, it implies that the collection is being used to specify an exact set of sketch entities to offset, hence, only those exact set of sketch entities will be offset. If no value is specified for this argument, then a default value of False will be assumed.
|
CreateOffsetConstraints | Boolean | Value that specifies whether offset constraints between the original and offset entities should be automatically created. If True is specified, then offset constraints will be automatically created. If False is specified, then offset constraints will not be created. If no value is specified, then a default value of True will be assumed to indicate that the offset constraints will be automatically created. This is an optional argument whose default value is True. |