api-issue-tracker icon indicating copy to clipboard operation
api-issue-tracker copied to clipboard

Layout::SketchUpModel#path and #path= methods missing

Open DanRathbun opened this issue 6 years ago • 10 comments

LayOut Ruby API Issue

Layout::SketchUpModel has no #path method.

We might want to name this filepath so as not to confuse readers with Layout::Path objects.

Once the object is instantiated, there is no way to get the path (aka filepath) property.

If your code is creating the object, it is likely the path string is known, but if you open an existing .layout file, your code cannot get the path of a viewport's model.


Layout::SketchUpModel has no #path= setter method.

We might want to name this filepath= so as not to confuse readers with Layout::Path objects.

A coder has run into this issue where they cannot set the path for the viewport as presetup in a template, without resorting to a rigmarole of copying the template viewport's bounds and properties and recreating the viewport. See public forum thread ... https://forums.sketchup.com/t/layout-ruby-and-use-of-a-template/113291


This is related to another issue:

EDIT: It has been reported that viewports should be transformed using the Entity#transform! method.

DanRathbun avatar Aug 26 '19 18:08 DanRathbun