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

Loading non SKP definitions through API #254

Closed
Eneroth3 opened this issue May 3, 2019 · 7 comments
Closed

Loading non SKP definitions through API #254

Eneroth3 opened this issue May 3, 2019 · 7 comments

Comments

@Eneroth3
Copy link

Eneroth3 commented May 3, 2019

Currently the SketchUp Ruby API allows for loading ComponentDefinition objects from external SKP files, and use importers to load other supported formats and have the user place the component manually with Place tool. To my knowledge the latter can't be done without user interaction.

It would however be very useful if you could use the importers to only load a ComponentDefinition to the DefintionList, without any UI. this would essentially allow for extension to have live links to non-skp references. One use case would be an extension that lets the user crop DWGs and later reload them when updated, while retaining the cropping.

I've had a brief look at the interface for third party importers (headers/sketchupapi/import_export/modelexporterplugin.h) and suspects these could also be supported as they essentially converts the imported file and save it to a temporary location, and let SketchUp handle Place tool activation.

2019-05-03_12h13_48

Not sure if this should be logged separately, but another thing I've noticed is that imported components are associated with these temp paths, not the path of of the non-skp source. From a user point of view this temp path makes little sense and probably shouldn't be exposed, while it could be useful to locate the external non-skp source. Perhaps this could even be regarded a bug. I was thinking the import feature could override the component path after import.

@Eneroth3
Copy link
Author

Eneroth3 commented May 3, 2019

I'd be glad if the component path could be re-associated with the non-skp file after import, even if the other things are implemented at a later stage. Eneroth Reference Manager lets the user navigate to linked files, and currently it just leads you to the temp folder. Even emptying the path after import would in my view be cleaner.

2019-05-03_12h18_34

@thomthom
Copy link
Member

thomthom commented May 3, 2019

Yea - we have the same challenge with the Trimble Connect extension. It allows for references of any format SketchUp support. And the inconsistent handling of undo and Place Component activation is a pain.

@thomthom
Copy link
Member

thomthom commented May 3, 2019

Not sure if this should be logged separately, but another thing I've noticed is that imported components are associated with these temp paths, not the path of of the non-skp source. From a user point of view this temp path makes little sense and probably shouldn't be exposed, while it could be useful to locate the external non-skp source. Perhaps this could even be regarded a bug. I was thinking the import feature could override the component path after import.

Please log this separately. Makes dealing with logged issues much easier if each refer to a single scenario.

@Eneroth3
Copy link
Author

Eneroth3 commented May 3, 2019

Will do! Generally I'm very keen on keeping things separate but on this occasion I was unsure how integrated this was to the rest.

Edit: #255 created.

@DanRathbun
Copy link

DanRathbun commented May 3, 2019

Currently the SketchUp Ruby API allows for loading ComponentDefinition objects from external SKP files, and use importers to load other supported formats and have the user place the component manually with Place tool. To my knowledge the latter can't be done without user interaction.

It might be done with a "Send ESC" hack. See my 3 yr old example in the forum ...

https://forums.sketchup.com/t/example-import-a-3ds-using-a-specific-transform-cross-platform/23425

@Eneroth3
Copy link
Author

Logged as SKEXT-2872

@DanRathbun
Copy link

@thomthom : I believe this has been satisfied in release 2021.1 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants