iLogic created text box breaking dimension lines

iLogic created text box breaking dimension lines

cmcconnell
Collaborator Collaborator
1,198 Views
7 Replies
Message 1 of 8

iLogic created text box breaking dimension lines

cmcconnell
Collaborator
Collaborator

I have cobbled together a set of forms and rules that is triggered when we start a new idw. It presents the user with a drop down list of tblocks and drawing notes. The user picks which tblock he wants, and then pick a note from a list for each note position.

 

These notes are placed in the drawing as a single text element of fixed width. The problem is, this text box forces dim lines to break if it gets close to them. Is there a way to close-crop the textbox boundary to the text or, to place it behind the idw geometry so that it does not break the dims?

 

corym-2018-0233.png

 

Here is the portion of the rule that builds and places the text:

' Build the Note
sNoteAll = sNote1 + vbCrLf +
sNote2 + vbCrLf +
sNote3 + vbCrLf +
sNote4 + vbCrLf +
sNote5 + vbCrLf +
sNote6 + vbCrLf +
sNote7 + vbCrLf +
sNote8 + vbCrLf +
sNote9 + vbCrLf +
sNote10 + vbCrLf +
sNote11 + vbCrLf +
sNote12 + vbCrLf +
sNote13 + vbCrLf +
sNote14 + vbCrLf +
sNote15 + vbCrLf +
sNote16 + vbCrLf +
sNote17

'MessageBox.Show(sNoteAll, "Title")

'Place the note
Dim oNoteAll As GeneralNote
	oNoteAll = oGeneralNotes.AddFitted(oTG.CreatePoint2d(dXCoord, dYCoord), sNoteAll)
	oNoteAll.Rotation = oRotation
	oNoteAll.Width = oSetWidth
Mechanix Design Solutions inc.
0 Likes
Accepted solutions (1)
1,199 Views
7 Replies
Replies (7)
Message 2 of 8

chandra.shekar.g
Autodesk Support
Autodesk Support

@cmcconnell,

 

Instead of creating general note, text could be updated to dimension text.

 

To understand more about requirement, can you please provide screen shots or video record to demonstrate?

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Message 3 of 8

cmcconnell
Collaborator
Collaborator

That may work! Now I just have to figure out how to do it! 🙂

Here is a video that shows how it works and what the issue is.

 

 

Mechanix Design Solutions inc.
Message 4 of 8

cmcconnell
Collaborator
Collaborator

Did you have a chance to look at this, Chandra?

Mechanix Design Solutions inc.
0 Likes
Message 5 of 8

chandra.shekar.g
Autodesk Support
Autodesk Support

@cmcconnell,

 

My apologies for late reply,

 

Issue is reproducible through UI also. So, I transferred this case to product support.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 6 of 8

dgreatice
Collaborator
Collaborator

Hi,

 

I think this because empty field.

 

I see some sNote(1-17) are empty field, maybe you must remove empty field from sNoteall

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
Message 7 of 8

MjDeck
Autodesk
Autodesk
Accepted solution

Hi @cmcconnell,
There does seem to be a problem with the dimension display. As @dgreatice noted, you can work around it in the vertical direction by avoiding blank lines. Here's a way to do it, based on your code. If you try this and you don't already have a Sub Main in your rule, then put all your existing code in the Sub Main (between Sub Main and the first End Sub).

Sub Main()
' Build the Note
Dim sNoteAll As String = ""
AddNote(sNoteAll, sNote1)
AddNote(sNoteAll, sNote2)
AddNote(sNoteAll, sNote3)
AddNote(sNoteAll, sNote4)
AddNote(sNoteAll, sNote5)
AddNote(sNoteAll, sNote6)
AddNote(sNoteAll, sNote7)
AddNote(sNoteAll, sNote8)
AddNote(sNoteAll, sNote9)
AddNote(sNoteAll, sNote10)
AddNote(sNoteAll, sNote11)
AddNote(sNoteAll, sNote12) AddNote(sNoteAll, sNote13) AddNote(sNoteAll, sNote14) AddNote(sNoteAll, sNote15) AddNote(sNoteAll, sNote16) AddNote(sNoteAll, sNote17) 'Place the note Dim oNoteAll As GeneralNote oNoteAll = oGeneralNotes.AddFitted(oTG.CreatePoint2d(dXCoord, dYCoord), sNoteAll) oNoteAll.Rotation = oRotation oNoteAll.Width = oSetWidth End Sub Sub AddNote(ByRef sNoteAll As String, sNote As String) If (Not String.IsNullOrEmpty(sNote)) Then If (Not String.IsNullOrEmpty(sNoteAll)) Then sNoteAll = sNoteAll + vbCrLf End If sNoteAll = sNoteAll + sNote End If End Sub

Mike Deck
Software Developer
Autodesk, Inc.

Message 8 of 8

cmcconnell
Collaborator
Collaborator

I finally had some time to try this. It works very well - it reduces the text box size to only be large enough for the text that it is showing. Much better, thank you.

 

There is little doubt in my mind that there are many efficiencies similar to that that can be found in my code by somebody that knows what they are doing. 🙂

Mechanix Design Solutions inc.
0 Likes