Share

SketchBlockDefinitionProxy.OffsetSketchEntitiesUsingDistance Method

Parent Object: SketchBlockDefinitionProxy

Description

Method that offsets a sketch entity or a group of connected sketch entities. In both cases, the base sketch entity is first offset by the specified distance and along the specified direction. The base sketch entity is determined as follows: * If only one sketch entity needs to be offset, it will be treated as the base sketch entity. * If a group of end-to-end connected entities need to be offset, the first entity in the group will be treated as the base sketch entity. If this method successfully offsets the specified input sketch entities, the newly created sketch entities are returned.

Syntax

SketchBlockDefinitionProxy.OffsetSketchEntitiesUsingDistance( SketchEntities As ObjectCollection, OffsetDistance As Double, NaturalOffsetDirection As Boolean, [IncludeConnectedEntities] As Boolean, [CreateOffsetConstraints] As Boolean ) As SketchEntitiesEnumerator

Parameters

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.
OffsetDistance Double Specifies the offset distance for the base sketch entity (the sketch entity specified by the first item in the SketchEntities collection). Since a group of connected entities that need to be offset will all be offset by the same distance, it implies that the distance value specified by this argument will be used not only for the base sketch entity but also for all the remaining connected sketch entities. Since the offset of the base sketch entity can lie on either side of the base entity, the offset distance in itself does not provide sufficient information regarding the final position for the offset of the base sketch entity. The NaturalOffsetDirection boolean argument can be used to specify one out of the two possible offset directions for the base sketch entity. Thus, the offset distance specified by this argument and the offset direction specified by the NaturalOffsetDirection boolean argument together determine the final position for the offset of the base sketch entity. Once the offset position for the base sketch entity is determined, the offset positions for any other additional connected sketch entities can be inferred.
NaturalOffsetDirection Boolean Value that can be used to specify one out of the two possible offset directions. This argument applies to the base sketch entity (the sketch entity specified by the first item in the SketchEntities collection). The natural offset direction is along the natural normal direction at any point on the base sketch entity which in-turn is defined as the cross-product of the vector representing the tangent at that point and the vector representing the sketch normal. If True is specified, then the points on the offset of the base sketch entity will be positioned in the direction specified by the natural normal at the corresponding points on the original base sketch entity. If False is specified, then the offset of the base sketch entity will be positioned in the direction opposite to that of the natural normal. Thus, this argument determines on which side of the base sketch entity the offset of the base sketch entity will be placed. Since this argument specifies only the offset direction, the OffsetDistance argument has to be used to specify the offset distance along the offset direction specified by this argument. Thus, the offset direction specified by this argument and the offset distance specified by the OffsetDistance argument together determine the final position for the offset of the base sketch entity. Once the offset position for the base sketch entity is determined, the offset positions for any other additional connected sketch entities can be inferred.
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.

This is an optional argument whose default value is False.
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.

Version

Introduced in version 2010

Was this information helpful?