Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Set Font size and color in drawing table

Status
Not open for further replies.

sri91

Mechanical
Aug 29, 2019
42
0
0
IN
Hi Everyone,
I am trying to set the parameters 'Font size' and 'color' in the texts of a drawing table.
I am using the below code.
What ever the text size I give, it is taking zero(0).

Can you please suggest me.


drwTbls(drwTblNum).SetCellString rowCount, 2, wrksht.Cells(j, 1)
drwTbls(drwTblNum).SetCellAlignment rowCount, 2, CatTableMiddleCenter
Set currText = drwTbls(drwTblNum).GetCellObject(rowCount, 2)
currText.SetParameterOnSubString catFontSize, 0, 0, 0.075
Dim txtProps1 As DrawingTextProperties
Set txtProps1 = currText.TextProperties
currText.SetFontSize 0, 0, 0.095
currText.TextProperties.Color = vbGreen


Thanks in advance
SURYASRI
 
Replies continue below

Recommended for you

Hi Little,
Even though I have given the update, it is not setting the font size.
Still it is changing to zero only.
Please help.

drwTbls(drwTblNum).SetCellString rowCount, 5, Right(wrksht.Cells(j, 2), 5)
drwTbls(drwTblNum).SetCellAlignment rowCount, 5, CatTableMiddleCenter
Set currText = drwTbls(drwTblNum).GetCellObject(rowCount, 3)
Dim ifs As Double
ifs = 0.075
currText.SetFontSize 0, 0, ifs
colo = currText.TextProperties.Color
currText.TextProperties.Update

Thanks
SURYASRI
 
Status
Not open for further replies.
Back
Top