I want to access an object after it’s imported but still not placed.
Is there a way to do it?
I have tried:
Sketchup.active_model.active_view.refresh # Refresh view
id = UI.start_timer(2, false) # set timer
Is there a way to maybe automatically place an object in the scene on import?
import = model.import(file_name, options)
model = Sketchup.active_model
entities = model.entities # no imported model
selection = model.selection # no imported model
As of SketchUp 2021.1 you have
That way you get a handle to the definition and you can place it in the model yourself.
Use the DefinitionList #import method to import a (non-SketchUp) 3d model file as a definition. Then you can access this definition before placing.
Okay thanks! I’m currently on 21.0.391. Is there a solution for this version or is it time to upgrade?
If you want to work with SU2021, You can still download the SketchUpPro-2021-1-332-116 from here:
and you can update the existing version only…
Fixes/improvements are never backported. You’d have to use the minimum version for that feature. This will off course mean your extension’s minimum supported SU version will be SU2021.1.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.