How do I change Font Size and title the Text 45°? with I logic

How do I change Font Size and title the Text 45°? with I logic

Darkforce_the_ilogic_guy
Advisor Advisor
704 Views
3 Replies
Message 1 of 4

How do I change Font Size and title the Text 45°? with I logic

Darkforce_the_ilogic_guy
Advisor
Advisor

I have this code ... but the font size is too small..I want it to be 50 mm, and rotatet the text box 45°

 

I would like to know how I can delete the skecht again as the last thing in the code.. and only the one the code have created

 

I

Dim oDrawDoc As DrawingDocument
  oDrawDoc = ThisApplication.ActiveDocument

    Dim oSketch As DrawingSketch
  oSketch = oDrawDoc.ActiveSheet.Sketches.Add
  
  
  

 oSketch.Edit
 
 Dim oTG As TransientGeometry
     oTG = ThisApplication.TransientGeometry

 Dim sText As String
    sText = "Drawing Notes"
    Dim oTextBox As TextBox
 
   


 oTextBox08A = oSketch.TextBoxes.AddFitted(oTG.CreatePoint2d(12, 12), "draft")


' Exit the sketch from the edit environment.
    oSketch.ExitEdit

 

0 Likes
705 Views
3 Replies
Replies (3)
Message 2 of 4

bradeneuropeArthur
Mentor
Mentor
otextbox08A.Style.FontSize =10
Dim r As Double = Math.PI/2

otextbox08A.Style.Rotation = r

45 degrees not possible, only 0 90 180 360 possible!!

Regards,

 

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 4

your code seens to change all a lot more font size then just the textbox that it my code create .. do you know how to make it only change the single textbox ?

0 Likes
Message 4 of 4

it changes only the created texbox "otextbox08A"

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes