Hide Table of Contents
InsertCurvedText Method (ISketchManager)
ArcAlignedText[out]
IArcAlignedText

Inserts the specified text along the curve of the specified Arc.

.NET Syntax

Visual Basic (Declaration) 
Function InsertCurvedText( _
   const dsString& Contents As System.String, _
   dsCircleArc* CircleArc As CircleArc _
) As ArcAlignedText
C# 
ArcAlignedText InsertCurvedText( 
   System.string Contents,
   CircleArc CircleArc
)
JavaScript 
InsertCurvedText( 
   Contents : String,
   CircleArc : dsCircleArc
) : dsArcAlignedText
COM native C++ 
HRESULT InsertCurvedText( 
   BSTR Contents,
   ICircleArc* CircleArc,
   IArcAlignedText** ArcAlignedText
) 
C++ 
DSRESULT InsertCurvedText( 
   const dsString& Contents,
   dsCircleArc* CircleArc,
   dsArcAlignedText** ArcAlignedText
) 

Parameters

Contents
Text string
CircleArc
ICircleArc
ArcAlignedText[out] or Return Value
IArcAlignedText

Example

'--------------------------------------------------------------
' Preconditions:
' 1. Create a VBA macro in a software product in which VBA is
'    embedded.
' 2. Copy and paste this example into the Visual Basic IDE.
' 3. Add a reference to the DraftSight type library,
'    install_dir\bin\dsAutomation.dll.
' 4. Start DraftSight.
' 5. Open c:\ProgramData\Dassault Systemes\DraftSight\Examples\pump housing.dwg.
' 6. Run the macro.
'
' Postconditions: Creates an Arc with "Curved Text" in the
' lower-left area of the drawing.
'----------------------------------------------------------------
Option Explicit
Sub main()
    Dim dsApp As DraftSight.Application
    Dim dsDoc As DraftSight.Document
    Dim dsModel As DraftSight.Model
    Dim dsSketchManager As DraftSight.SketchManager
    Dim circlearc1 As DraftSight.CircleArc
    Dim arcAlignedText As DraftSight.arcAlignedText
    Dim curvedTextSettings As DraftSight.CurvedSettings
    Dim typeface As String
    Dim Bold As Boolean
    Dim Italic As Boolean
    Dim Charset As Long
    Dim pitchAndFamily As Long
    Dim dsSheet As DraftSight.Sheet
    Dim dsVarSheets As Variant
    Set dsApp = GetObject(, "DraftSight.Application")
   
    'Abort any command currently running in DraftSight
    'to avoid nested commands
    dsApp.AbortRunningCommand
    Set dsDoc = dsApp.GetActiveDocument()
    If Not dsDoc Is Nothing Then
        Set dsModel = dsDoc.GetModel()
        Set dsSketchManager = dsModel.GetSketchManager()
        Set circlearc1 = dsSketchManager.InsertArc(7.36982486789842, 1.85302055152848, 0#, 5.20869124502084, 1.54022710953838, 2.99868519349434)
        Set arcAlignedText = dsSketchManager.InsertCurvedText("Curved Text", circlearc1)
        Set curvedTextSettings = arcAlignedText.GetCurvedTextSettings
        curvedTextSettings.GetFontParameters typeface, Bold, Italic, Charset, pitchAndFamily
    Else
        MsgBox "No drawing open in DraftSight"
    End If
End Sub

Remarks

After you create the curved text using this method, use ICurvedSettings to set its properties.
 

See Also

Availability

DraftSight 2018 SP2


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   InsertCurvedText Method (ISketchManager)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:




x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2019 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.