Class CalloutModel
- Namespace
- Hymma.Solidworks.Addins
- Assembly
- Hymma.Solidworks.Addins.dll
Allows add-in applications to manipulate single and multi-row callouts
public class CalloutModel : IWrapSolidworksObject<Callout>, IReleaseSolidworksObject
- Inheritance
-
CalloutModel
- Implements
-
IWrapSolidworksObject<Callout>
- Inherited Members
Constructors
CalloutModel(List<CalloutRow>, ISldWorks, ModelDoc2, bool)
create a callout
public CalloutModel(List<CalloutRow> rows, ISldWorks solidworks, ModelDoc2 model, bool updateWithSelection = true)
Parameters
rowsList<CalloutRow>list of string in this callout. will be add to the UI in the same order added to this list
solidworksISldWorkssolidworks object
modelModelDoc2model to add selection
updateWithSelectionboolwill make callout dependent on selection if set to true.
CalloutModel(List<CalloutRow>, ISldWorks, ModelView)
Creates a callout independent of a selection in a SolidWorks.Interop.sldworks.ModelView
public CalloutModel(List<CalloutRow> rows, ISldWorks solidworks, ModelView modelView)
Parameters
rowsList<CalloutRow>list of string in this callout. will be add to the UI in the same order added to this list
solidworksISldWorkssolidworks object
modelViewModelViewmodel view to create the callout in
Properties
FontSize
Gets or sets the font size for this callout.
public int FontSize { get; set; }
Property Value
Handler
solidworks event handler for a callout
public SolidworksCalloutHandler Handler { get; }
Property Value
HasTextBox
Gets or sets whether the callout text is enclosed within a box
public bool HasTextBox { get; set; }
Property Value
MultipleLeaders
Gets or sets the display of multiple leaders for this callout.
public bool MultipleLeaders { get; set; }
Property Value
OpaqueColor
Gets or sets the opaque (background) color for the labels for this callout.
public SysColor OpaqueColor { get; set; }
Property Value
Remarks
You must use a SysColor; you cannot use any other RGB values. To see system colors, click Tools > Options > Colors. in the SOLIDWORKS user interface
Position
Gets and sets the position of this callout.
public Tuple<double, double, double> Position { get; set; }
Property Value
SkipColon
Gets and sets whether to add a colon : at the end of the callout label.
public bool SkipColon { get; set; }
Property Value
Solidworks
solidowrks object
public SldWorks Solidworks { get; }
Property Value
- SldWorks
SolidworksObject
actual solidworks SolidWorks.Interop.sldworks.ICallout object assigned to by addin
public Callout SolidworksObject { get; }
Property Value
- Callout
TargetStyle
Gets or sets the type of connection at the e point for this callout.
public swCalloutTargetStyle_e TargetStyle { get; set; }
Property Value
- swCalloutTargetStyle_e
TextFormat
Gets or sets the text format for this callout.
public TextFormat TextFormat { get; set; }
Property Value
- TextFormat
Methods
AddRow(CalloutRow)
adds a new row to this callout
public void AddRow(CalloutRow row)
Parameters
rowCalloutRow
GetRowIds(string)
get the row id for the value provided
public List<int> GetRowIds(string value)
Parameters
valuestring
Returns
GetRows()
each row in a callout has an id and a text value
public List<CalloutRow> GetRows()
Returns
- List<CalloutRow>
list of rows in a callout
LeaderStatus(bool, bool)
Sets the leader properties of the callout.
public bool LeaderStatus(bool visible, bool multiple)
Parameters
visibleboolTrue to display the leader, false to not
multipleboolTrue to display multiple leaders, false to not
Returns
- bool
True if the operation is successful, false if not
Remarks
You can only use this method before the callout is shown or while the callout is hidden.
If Visible is set to false, then ICallout::TargetStyle is automatically set to swCalloutTargetStyle_None.
ReleaseSolidworksObject()
release solidworks object
public void ReleaseSolidworksObject()