Rhino script


#1

Hi everybody!

I have a question and I don’t know if somebody has already solved it.

Here is the thing. We want a script in which after you insert an object into your rhino file, it then explodes it (so it is no longer a block), and after that it has to copy the location of the original part to the hyperlink section in the “properties”.

Is this possible. With this we would like to always keep track of were the original file came from.

Thanks in advance!


(Pascal Golay) #2

Hi Martin- I am not sure this is exactly what you want but it may be a start- To use the script, extract and save the .rvb file from the attached zip archive, then drag and drop the saved rvb over an open Rhino v5 window. This will load the script, set it up to load on startup in the future and register the alias

InsertAsHyperlinked

that will run the script much like a regular command. An alias can be typed or added to a toolbar button or keyboard shortcut (F-key).

InsertAsHyperlinked.zip(526 Bytes)

-Pascal


#3

Hi Pascal!

Thanks for the script. Works great.

Only, is it possible to keep the link after you explode this part or does the link always break when you explode it? We just want it to link to the folder of the original part, and not the original part itself. This is because, by exploding the object we want to adjust it and creat a different version of it. But still we want to keep track of where it came from.

Thanks in advance!


(Pascal Golay) #4

Hi Martin- I made a couple of changes- is this better?

-Pascal

InsertAsHyperlinked (2).zip(556 Bytes)


#5

Hi Pascal!

Thanks! That was what we were looking for!

Now I have a different question:

Together with Rhino 5,0 we use Vray. If we load an block into Rhino which already contains a material with the same name, it prompts a question if we want to use the existing scene material or if we want to replace the material with the material of the block.

Is it possible to insert an block and that the prompt automatically chooses the use existing scene material. So we don’t have to see the prompt and the block just loads?

Now we are loading the scene with the blocks and we every time have to answer the prompt. So that takes more time to load.

Thanks in advance!


#6

Hi Pascal,

Next to my question about the material prompt, I have a question about the insert as hyperlinked. When we use that command know it is imported as an object. So it is not a block anymore.

Is it possible that with the script we insert the part as a block, but then when we explode the block that the links stays in the properties? So is it maybe possible to have a separate script that explodes the block that is imported and then copies the hyperlink to the properties?

Thanks for all the great help!


(Pascal Golay) #7

Hi Martin-

yes, that is certainly possible, I’ll take a look at it shortly.

@Martin_Verboom, - this should do it- (also the script is a little less stupid in how it does its work then before… )
InsertAsHyperlinked only does the insertion and adds the hyperlink to the block, and I added ExplodeHyperlinked to do the exploding part… let me know if I did that right…

-Pascal
InsertAsHyperlinked (3).zip(698 Bytes)

-Pascal


#8

Hi Pascal,

Perfect! This was exactly what we needed!

Thanks for all the help!