Eneroth Reference Manager

Not that I’m aware of…

Here is the screenshot of of the ‘save as…’ dialogue. Hope it helps. Let me know if you need anything else.

1 Like

Julia,

how are you getting the ‘path’ shown in the screenshot?

it’s not the path for mac SU…

Sketchup.find_support_file("Marc.skp", "Components/Components Sampler/").inspect
# returns
"/Applications/SketchUp 2019/SketchUp.app/Contents/Resources/Content/Components/Components Sampler/Marc.skp"

also, if you want to ensure which path/folder/file to open, you need to roll your own html dialog and return path.raw to your callback [for cross platform use]…

john

The path is a property of the definition object.

But it appears that the “Marc” component was created and saved on a PC, hence the PC path string.

1 Like

I’ve logged this issue in the SketchUp API issue tracker (https://github.com/SketchUp/api-issue-tracker/issues/368).

For now I think the workaround has to be to relink one component at a time on Mac (when not using bulk relink to relink a whole folder structure at once). In some cases the suggested file name can probably be helpful to differentiate what component you relink, but that wont work for internal components or components with non-descriptive names.

@john_drivenupthewall, I don’t know if the Mac template is different but you can select Marc and run Sketchup.active_model.selection.first.definition.path to see what path he is associated with. If the same template is used on both systems this component will however show the location on Windows machine.

The extension is honestly and transparently* displaying the path the component is already associated with, not using any secret rules to silently remap the path depending on system.

However, you can use the bulk relink feature yourself to relink all components in “C:/ProgramData/SketchUp/SketchUp 2019” to “/Applications/SketchUp 2019/SketchUp.app/Contents/Resources/Content/”.

* The extension does show all paths with forward slashes as it looks awful to mix the two styles and it makes sorting more predictable, but the meaning of the path isn’t changed.

Doing this on a Mac indeed returns the Windows path

C:/ProgramData/SketchUp/SketchUp 2019/SketchUp/Components/Components Sampler/Marc.skp

This is strange because on Mac the Components Sampler files are present at

/Applications/SketchUp 2019/SketchUp.app/Contents/Resources/Content/Components/Components Sampler

It suggests that when setting up the templates, the developers didn’t think about this particular detail and just used the same ones for PC and Mac.

#crossreferencing #outofthebox #onecause
Could this be related to the duplicating materials we see on a regular base?

for SU materials only the path basename is stored…

nice and cross platform…

for imported materials the stored path can be ridiculously long and often full of mac breaking content…

one users skm I fixed recently contained the php code for downloading ‘something’ from ‘somewhere’ [it was encrypted as well]…

this is also an issue with downloaded components and I would definitely NOT ‘blindly’ follow any of them…

john

Thank you for this explanation!

Hi J,
I haven’t visited here for a while but this post appears to have opened a large can of worms.

Anyhow, I finally figured out a nice little work around but It took me a little while to crystallize what it is I was actually trying to achieve. Here it is:

Essentially, I was hoping to run a batch import of components, maybe 20 or 30 at one time, (which SU does not allow natively) the caveat being that I want these incoming components to be imported to very specific positions within the model. In this case it is to have the parts laid out and nested onto material sheets for the purposes of CNC machining. I design recording studio furniture in SketchUp and when I finish a design, I wind up with a 3D model of the desk…


which I flatten down, if you will, in order to layout the parts on modelled material sheets. This helps with cost estimates and also helps us identify problems before cutting etc.

Before Eneroth’s Reference Manager this was a rather laborious task.

The solution:

The key is to make a ‘template model’ which contains pre positioned proxy components. These components exist in the positions I want my batch imported components to eventually occupy.

  1. The template model’s proxy components are given meaningful, preferably sequential, definitions such as ‘A,B,C……Z’ or ‘1,2,3…100’ etc

  2. I use Eneroth Reference Manager to do a batch save out operation of the proxy components. (Easy to do) - they are now living in the designated folder on my HD.

  3. To preserve my template model for later use and other jobs, at this point, I close it and then duplicate it to a new working folder.

  4. I open the duplicate template model and launch Eneroth Reference Manager. I select all proxy components from the list and then click ‘relink’ and select ‘common directory’.

  5. I point to the folder which contains all my new components to be batch imported.

Voilà. Batch import successful. The trick is that an incoming/replacement component must have the same file name as its proxy counterpart or Reference Manager will not be able to match them up. This is rather dangerous for organisational reasons, but I understand the need for this to be the case.

I can say this process has helped me shave off a couple of hours per job. I’ll say it here again: This extension should be absorbed into SketchUp natively.

Genius, Julia, Genius!

2 Likes

Hi Again J,
Just tried your ‘open model’ command inside reference manager. In short, it does not appear to be working as it should. Each time I hit the ‘open model’ button, I am hit with a dialogue box asking me to specify which Mac application I wish to use in order to open the file. I repeatedly choose S.U. from the list but then nothing happens…I made a video to help illustrate:

Good catch! I don’t have a Mac myself to test on but I though this was a cross platform approach.

Let’s try somethign else. If you run this in the Ruby Console. does that open the file Steel.skp?

system("open \"/Users/leigh/Desktop/Steel.skp\"")

Julia, the most ‘robust’ way on mac is to use the API method Sketchup.open_file(path)

with OS X being application centric, this simply opens an additional document taking into account whether the user is using tabbed or separate documents…

john

1 Like

does that open the file Steel.skp?

Yes it does…

1 Like

Version 2.1.1 has just been submitted for review and is hopefully available within a few days. Thanks for reporting this!

1 Like