Multi-Line General Note (Carriage Return Line Feed)?? Help.

Multi-Line General Note (Carriage Return Line Feed)?? Help.

Tiffany_Hayden_
Collaborator Collaborator
1,392 Views
5 Replies
Message 1 of 6

Multi-Line General Note (Carriage Return Line Feed)?? Help.

Tiffany_Hayden_
Collaborator
Collaborator

I'm trying to make a multiline general note. And I tried adding the /n/r and \n\r to my string to split the string into multiple lines and VBA doesn't seem to care about those. Below is my code. 

 

 

    Dim oDrawdoc As DrawingDocument
    Set oDrawdoc = ThisApplication.ActiveDocument

    Dim oSheet As Sheet
    Set oSheet = oDrawdoc.Sheets.Item(1)

    Dim oSheets As Sheets: Set oSheets = oDrawdoc.Sheets

    Dim oGeneralNotes As GeneralNotes
    Set oGeneralNotes = ThisApplication.ActiveDocument.ActiveSheet.DrawingNotes.GeneralNotes
    
    Dim oTG As TransientGeometry
    Set oTG = ThisApplication.TransientGeometry


    
    Dim strText_Elevation As String
    strText_Elevation = "1. ALL ELEVATIONS TAKEN FROM FINISHED FLOOR."
    
    Dim strtext_Supports As String
    strtext_Supports = "2. ALL SUPPORTS TO HAVE ?1" & """" & "CLEARANCE FROM FINISHED FLOOR."
    
   
     Dim strFullNote As String
    strFullNote = strText_Elevation & "/r/n" & strtext_Supports 
    
    
    Dim oGeneralNote As GeneralNote
    Set oGeneralNote = oGeneralNotes.AddFitted(oTG.CreatePoint2d(0.5, 2), strFullNote)
    oGeneralNotes.Item(oGeneralNotes.Count()).TextStyle.FontSize = 0.6 * 0.254
    oGeneralNotes.Item(oGeneralNotes.Count()).TextStyle.Rotation = pi / 2

Any help would be greatly appreciated. 

 

Thank you! 

Tiffany Hayden
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Accepted solutions (1)
1,393 Views
5 Replies
Replies (5)
Message 2 of 6

Tiffany_Hayden_
Collaborator
Collaborator

bump for help. 

Tiffany Hayden
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 3 of 6

Tiffany_Hayden_
Collaborator
Collaborator
Accepted solution

Just figured it out. 

 

Example: 

 

    Dim oDoc As DrawingDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    
    Dim oPosition As Point2d
    Set oPosition = ThisApplication.TransientGeometry.CreatePoint2d(0, 0)
    
    Dim sFormattedText As String
    
    sFormattedText = "<Numbering Format='" & "1" & "'>" & strText_Elevation & "</Numbering>" & "<Numbering Format='" & "1" & "'>" & strtext_Supports & "</Numbering>"

Tiffany Hayden
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 4 of 6

JBerns
Advisor
Advisor

@Tiffany_Hayden_,

 

Very helpful. Thanks.

 

I was trying to unsuccessfully include an ampersand (&) character in the string. I had to use the VBA editor to explore a formatted string.

 

Here is the format to use "&" in your strings:

Dim strText_Line1 As String = "BEFORE &amp; AFTER"

 

Wish it was easier to explore objects in iLogic. Thanks again for the formatting example.

 

 

Regards,

Jerry

 

-----------------------------------------------------------------------------------------
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
0 Likes
Message 5 of 6

Tiffany_Hayden_
Collaborator
Collaborator

@JBerns 

 

Great info! Thank you 

Tiffany Hayden
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 6 of 6

JBerns
Advisor
Advisor

Welcome.

 

- Jerry

-----------------------------------------------------------------------------------------
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
0 Likes