Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal enhancement to create dimensions and texts using ruby #782

Open
UweSketch opened this issue Apr 22, 2022 · 3 comments
Open

Minimal enhancement to create dimensions and texts using ruby #782

UweSketch opened this issue Apr 22, 2022 · 3 comments
Labels
enhancement logged parity Missing functional parity with client Ruby API SketchUp

Comments

@UweSketch
Copy link

Feature Request:

Enhance the ruby API at least such, that during creation of a dimension or text we can pass the font/size/style. (similar to how 3D text is created)

There are other requests on that topic that go much further. (see issue #48 )
This request here is what I consider the minimal enhancement to be able to create flexibly a dimension or text object.

Business/use case:
(see also the Sketchup forum at: Minimal Enh. to create dimension and text objects with ruby )

We model in 3D and communicate during the modeling phase in 3D (using Sketchup, Sketchup viewer, trimble connect and Sketchup viewer on iPad).
This is very efficient and many involved people prefer this to 3D modeling with communication in 2D.
Later, when most of the modeling and detail design phase is done and the production/building starts, 2D drawings become important.
Key for modeling, communicating and collaborating in 3D is being able to attach text and focus points using different colors and styles to the 3D model. Only being able to orbit a house, chair or gear box and walk around it, does not help.

Sketchup provides the basic tools for communication in 3D like linear dimensions, leaders (text) and 3D text (angular dimensions are however missing).
During design, we use for example predefined styles to indicate dimensions that are fixed (red), dimensions which might be made larger (green) or may be only changed to smaller values (blue).
Different font styles are used to indicate confirmed, proposed or to be answered dimensions or areas.
The main issue is, that neither font styles, sizes, fonts nor colors can be set from within ruby. We have ruby scripts to create the various dimensions, leaders or 3D texts. But as the style can only be set via the UI, the script ends with a message box telling the user to which color/font/style he has to manually change the created and pre-selected objects, so that it conforms to the rules.
This is not comfortable.

@DanRathbun
Copy link

During design, we use for example predefined styles to indicate dimensions that are fixed (red), dimensions which might be made larger (green) or may be only changed to smaller values (blue).
Different font styles are used to indicate confirmed, proposed or to be answered dimensions or areas.

The main issue is, that neither font styles, sizes, fonts nor colors can be set from within ruby.

Just a note to talk about a workaround that has been used since the beginning of the API when certain properties of objects (especially dimensions) have not yet been exposed.

What can be done is that you create components for a unit dimension (length of 1) and a generic text callout for each of the styles (fixed, growable, shrinkable) that your designs will need. You supply these components with your extension.

Then your extension loads these into the model's definition list and places instances near where they need to be. The instance can be exploded and then the positioning, alignment and attachment properties can be adjusted as necessary.

For text callouts the visible textual property will be set at this time.

When the design work is complete the generic dimension & text components can be purged from the definitions collection.

@thomthom thomthom added enhancement Ruby API SketchUp parity Missing functional parity with client labels Jun 27, 2022
@sketchup
Copy link

sketchup bot commented Sep 9, 2022

Logged as: SKEXT-3513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement logged parity Missing functional parity with client Ruby API SketchUp
Projects
None yet
Development

No branches or pull requests

3 participants