Model.CE_ConvertByMark_new#
- Model.CE_ConvertByMark_new(collection, source_style, target_style, tolerance, angle, unrealized_flag, combine_within_comp_only, ignore_link=0)#
Converts several spot or bolt connectors into a spotline or boltlline.
- Parameters:
collection (Collection) – The collection containing the connector entities to convert.
source_style (hwString) – The source connector style “spot” or “bolt”.
target_style (hwString) – The target connector style “spotline” or “boltline”.
tolerance (double) – The maximum distance between locations.
angle (double) – The maximum angle between locations to create the line.
unrealized_flag (unsigned int) –
0 - Do not unrealize the new connectors
1 - Unrealize the new connectors
combine_within_comp_only (unsigned int) –
0 - Combine connectors across components
1 - Combine connectors only within the same component
ignore_link (int) – Reserved for future development.
Example#
Combine spot connectors with IDs 101, 102 and 103 to spotline connectors#import hm import hm.entities as ent model = hm.Model() model.CE_ConvertByMark_new( collection=hm.Collection(model, ent.Connector, [101, 102, 103]), source_style="spot", target_style="spotline", tolerance=15.0, angle=10.0, unrealized_flag=0, combine_within_comp_only=0, )