Regarding Font Size in Drawing Sheet

Regarding Font Size in Drawing Sheet

dharmeshchandnani
Participant Participant
241 Views
2 Replies
Message 1 of 3

Regarding Font Size in Drawing Sheet

dharmeshchandnani
Participant
Participant

I have two methods name AddDrawingView and Dimensions.

 

I am calling the Dimensions in this method AddDrawingView

 

like 

private void AddDrawingView_Fascade(DrawingDocument drawingDoc, AssemblyDocument asmDoc)
{

////MYCODE////

Dimensions()

}

In AddDrawingView method I have used the code to arrange the name of the views like FRONT and TOP with a font size of around 0.55 according to the code below

{
view.Name = view_name;
Point2d position = inventor_app.TransientGeometry.CreatePoint2d(x_offset, y_offset); 
GeneralNote text_1 = drawingSheet.DrawingNotes.GeneralNotes.AddFitted(position, view_name);
text_1.FormattedText = view_name;
text_1.TextStyle.FontSize = 0.55;
}


and in Dimensions method I am giving font size to numeric value i.e. dimensions by using this code

 

foreach (GeneralDimension dimension in drawingDoc.ActiveSheet.DrawingDimensions.GeneralDimensions)
{
if (dimension.Type == ObjectTypeEnum.kLinearGeneralDimensionObject)
{

if (Empty)
{
//MYCODE///
}
else
{
dimension.Style.TextStyle.FontSize = 0.12
dimension.Precision = 1;
dimension.Style.TextStyle.Bold = true;
}


But when my AddDrawingView methods gets runs it makes the view name of proper size i.e. 0.55 but after making this when the second method is called i.e. Dimensions its makes all the values i.e the dimesnion which are numeric and the view name which is Text to font size of 0.12

 

I want the text font size i.e. view_name should have 0.55 font size and the dimension value which are numeric should be 0.12 in my drawing sheet]

 

I don't know what the issue is

Can anyone help me to solve this

 

 

Thank you in Advance

0 Likes
242 Views
2 Replies
Replies (2)
Message 2 of 3

SBix26
Consultant
Consultant

This is a question for programmers.  Try in the Inventor iLogic, API & VBA Forum.  I'll ask the moderators to move it there.


Sam B

Inventor Pro 2024.1.1 | Windows 10 Home 22H2
autodesk-expert-elite-member-logo-1line-rgb-black.png

0 Likes
Message 3 of 3

dharmeshchandnani
Participant
Participant

Thankyou so much

 

0 Likes