It bugs or Still need User Define "FormatText" at Drawing

It bugs or Still need User Define "FormatText" at Drawing

dgreatice
Collaborator Collaborator
432 Views
1 Reply
Message 1 of 2

It bugs or Still need User Define "FormatText" at Drawing

dgreatice
Collaborator
Collaborator

Hi,

 

I Have a little issue, when you use FormattedText in HoleThreadNotes, GeneralDimension or else. I call with "Data = oHoleThreadNote.FormattedHoleThreadNote", and get the "result". It showing HTML data.

Now when I set it back with little modfy (First modify--Add I Line): the result in Hole/Thread dimension are showing Tolerance that I don't need.

 

My Question is, are User still need redefine the HTML data again?, im checking with difference method when im using GeneralDimension, the HTML data is not showing Tolerance, Font Style etc.

 

Are is Bug or any comment from expert.

 

 

when you call example my code:

Public Sub ShowTextFormat()
Dim oDWGDoc As DrawingDocument
Set oDWGDoc = ThisApplication.ActiveDocument

 

Dim oSht As Sheet
Set oSht = oDWGDoc.ActiveSheet

 

Dim oDWGView As DrawingView
Dim oDwgNote As DrawingNotes
Set oDwgNote = oSht.DrawingNotes


Dim oGenNot As GeneralNote
Dim oGenDim As GeneralDimension

Dim oHoleThreadNote As HoleThreadNote

 

For Each oDWGView In oSht.DrawingViews
For Each oHoleThreadNote In oDwgNote.HoleThreadNotes
'Data = oHoleThreadNote.FormattedHoleThreadNote
'GetData = InputBox("Get Data", , Data)

'Result= <StyleOverride Font='AIGDT' FontSize='0.25'>n</StyleOverride><StyleOverride Font='Tahoma' FontSize='0.25'><HoleProperty HolePropertyID='kHoleDiameterHoleProperty' Precision='2' AlternatePrecision='2' UpperTolerance='0.000000' LowerTolerance='0.000000' ToleranceType='kSymmetricTolerance' TolerancePrecision='2' ToleranceAlternatePrecision='2'></HoleProperty> THRU</StyleOverride>
'First Modify (add 1 line) = <StyleOverride Font='AIGDT' FontSize='0.25'>n</StyleOverride><StyleOverride Font='Tahoma' FontSize='0.25'><HoleProperty HolePropertyID='kHoleDiameterHoleProperty' Precision='2' AlternatePrecision='2' UpperTolerance='0.000000' LowerTolerance='0.000000' ToleranceType='kSymmetricTolerance' TolerancePrecision='2' ToleranceAlternatePrecision='2'></HoleProperty></StyleOverride><Br/><StyleOverride Font='Tahoma' FontSize='0.25'>THRU</StyleOverride>

 

'oHoleThreadNote.FormattedHoleThreadNote = "<StyleOverride Font='AIGDT' FontSize='0.25'>n</StyleOverride><StyleOverride Font='Tahoma' FontSize='0.25'><HoleProperty HolePropertyID='kHoleDiameterHoleProperty' Precision='2' AlternatePrecision='2' UpperTolerance='0.000000' LowerTolerance='0.000000' ToleranceType='kSymmetricTolerance' TolerancePrecision='2' ToleranceAlternatePrecision='2'></HoleProperty></StyleOverride><Br/><StyleOverride Font='Tahoma' FontSize='0.25'>THRU</StyleOverride>"

 

'Result after First Modify are showing tolerance

 

'After second Modify with no Tolerance = <StyleOverride Font='AIGDT' FontSize='0.25'>n</StyleOverride><StyleOverride Font='Tahoma' FontSize='0.25'><HoleProperty HolePropertyID='kHoleDiameterHoleProperty' ></HoleProperty></StyleOverride> <Br/><StyleOverride Font='Tahoma' FontSize='0.25'>THRU</StyleOverride>

 

'oHoleThreadNote.FormattedHoleThreadNote = "<StyleOverride Font='AIGDT' FontSize='0.25'>n</StyleOverride><StyleOverride Font='Tahoma' FontSize='0.25'><HoleProperty HolePropertyID='kHoleDiameterHoleProperty' ></HoleProperty></StyleOverride> <Br/><StyleOverride Font='Tahoma' FontSize='0.25'>THRU</StyleOverride>"
Next 'next Hole Thread Note
   
For Each oGenDim In oSht.DrawingDimensions.GeneralDimensions
MsgBox oGenDim.Text.FormattedText
Next 'general dimension
Next 'next drawing view

End Sub

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

Autodesk Inventor Professional Certified 2014
0 Likes
433 Views
1 Reply
Reply (1)
Message 2 of 2

clutsa
Collaborator
Collaborator

I agree that this seems like a bug. I believe if you go with...

oHoleThreadNote.FormattedHoleThreadNote = "<StyleOverride Font='AIGDT' FontSize='0.25'>n</StyleOverride><StyleOverride Font='Tahoma' FontSize='0.25'><HoleProperty HolePropertyID='kHoleDiameterHoleProperty'></HoleProperty> </StyleOverride><Br/><StyleOverride Font='Tahoma' FontSize='0.25'>THRU</StyleOverride>"

you will get what you want. I basically removed all attributes from <HoleProperty> and then it seems to work. Why all those attributes are there when they aren't correct, I have no idea.

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes