It bugs or Still need User Define "FormatText" at Drawing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
Autodesk Inventor Professional Certified 2014