Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hi @keithc03GZXH6 . This is code that copies the properties of one text style to another. You need to write the appropriate names for lines 4 and 5.

Dim oDDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim oTM As TransactionManager = ThisApplication.TransactionManager
Dim oTS As TextStylesEnumerator = oDDoc.StylesManager.TextStyles
Dim sNameTextA As String = "Name text style A"
Dim sNameTextB As String = "Name text style B"
Dim oStyleA As TextStyle = oTS.Item(sNameTextA)
Dim oStyleB As TextStyle = oTS.Item(sNameTextB)
Dim newTM As Transaction = oTM.StartTransaction(oDDoc, "ChangeTextStyle")
If oStyleA.InUse Then
	oStyleA.Bold = oStyleB.Bold
	oStyleA.Color = oStyleB.Color
	oStyleA.Font = oStyleB.Font
	oStyleA.FontSize = oStyleB.FontSize
	oStyleA.HorizontalJustification = oStyleB.HorizontalJustification
	oStyleA.Italic = oStyleB.Italic
	oStyleA.LineSpacing = oStyleB.LineSpacing
	oStyleA.Rotation = oStyleB.Rotation
	oStyleA.Underline = oStyleB.Underline
	oStyleA.VerticalJustification = oStyleB.VerticalJustification
	oStyleA.WidthScale = oStyleB.WidthScale
End If
newTM.End()

 

Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor

LinkedIn | My free Inventor Addin | My Repositories

Did you find this reply helpful ? If so please use the Accept as Solution/Like.

EESignature