TextObject - lingering questions

TextObject - lingering questions

MichaelT_123
Advisor Advisor
548 Views
2 Replies
Message 1 of 3

TextObject - lingering questions

MichaelT_123
Advisor
Advisor

Hi TF360,

 

This is about your recent messing around with sketchText object.

As per the current API documentation sketchText object has the property angle which along with the property position defines the placement of the object in 2D space. Rightly so, as without these two fundamental properties 2D geometry as we know it would not exist.

In spite of this F360 engine generates the following:

 '''

    textObjectAngle    = textObject.angle

  File " \adsk\fusion.py", line 59187, in _get_angle

    return _fusion.SketchText__get_angle(self)

RuntimeError: 2 : InternalValidationError : fusionText

 '''

The code line:

textObjectAngle    = textObject.angle

is consumed by "\adsk\fusion.py" without any reflux but only when textObject has been created by old UI TextDialog invocation method (in old design files).

  • Yes, I know that the current sketchTextInput dialogue does not present the textObject rotation handle.
  • And Yes, I know that the dialogue box presents two types of textObjects to be processed: Text and TextOnPath.
  • And Yes, I do not know why switching back from TextOnPath to Text mode, one is presented with empty DialogBox !!!?.
  • And Yes, I do not know, if the responsible for this development, members of TF360 have ever checked their work, but instead included it to be used by clients of F360 software !!!?.
  • … more questions linger …

 

Sincerely

MichaelT

MichaelT
0 Likes
549 Views
2 Replies
Replies (2)
Message 2 of 3

BrianEkins
Mentor
Mentor

What has happened is that the text capability in Fusion was completely redone.  In the UI, it's now impossible to create the old type of text and there are now two new types; multiline and along a curve.  In order to not break all existing programs that created text, the API still supports the old functionality and allows you to create the old type of text.  Also, any existing Fusion files that have text that was created before this change will contain the old type of text.  It's not converted to the new type but exists and is edited as the old type, but it's impossible to create new instances of the old type.

 

In an ideal world, the old text would completely go away and we would only have the new text but to support older existing text and to support existing programs they continue to co-exist with the expectation that all new files will only contain new text.  This is true for user-created files but not necessarily true for files operated on with the API since you can still place the old text.

 

For the API, a decision was made to enhance the existing SketchText object to support both the old and new type of text.  The methods and properties on the SketchText to support the old type of text are still there but are no longer documented in the help so someone using the API for the first time won't even be aware that the old type of text exists. In the future I expect the code hints for the old type to also go away so there's not clue that the functionality is there, even though it is and will continue to function to allow older programs to work.

 

The best advice is to migrate your code to use the new type of text.  Although, I agree that it would be good for the placement of multi-line text to support the ability to define an angle.  Especially since you can rotate the text in the UI.  The workaround today, is to place the text and the use the move method on the Sketch object to rotate the sketch lines that define the box around the text.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 3 of 3

MichaelT_123
Advisor
Advisor

Hi Mr Ekins,

 

I hope that TF360 will come to their senses and correct their sloppiness

and/or the attempt to commit the crime against 2D Geometry.

 

The punishment for the later is:

Pull a 3D individual though 1D Mata Orifice until it stretches to Infinium.

 

They should know that they will end up in a very tight place where there are no angles.

Good news (for them) is that all their points will be preserved.

 

Regards

MichaelT 

MichaelT
0 Likes