Ruby coder needed. Custom plugin/script

Ruby coder needed. Custom plugin/script

Postby ptasznick » Sun Jan 22, 2023 12:22 pm

Dear All,
I'm looking for a person who can write a custom script for cash.

I'm having problems to find certain people doing those things online.


I need a script that takes all groups and components within a model or a selection (with all nested items), reads the material name given to that group/component and writes this name into a parameter that can be accessed with LayOut Auto-text feature. In worst case this can be written to the Instance parameter of each entity.

Please - write me a quotation for such service.

Thank You
0

ptasznick 
 

Re: Ruby coder needed. Custom plugin/script

Postby TIG » Sun Jan 22, 2023 1:55 pm

https://sketchucation.com/pluginstore?p ... Descriptor already manipulates the component's description with details about the component.
It won't seem too hard to adjust it to do instances/groups and add the material's name ?
Then the Layout auto-text can use the description to add into some text ?
What other attribute were you thinking of to take this extra data ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Ruby coder needed. Custom plugin/script

Postby ptasznick » Mon Jan 23, 2023 11:31 am

I will check out Component Descriptor - and yes - this seems to be close to what I need.

Only parameter that is visible to normal user and allows for labeling in Layout is the Instance parameter. It is also common for groups and components (at least the name "Instance" is the same). Every other parameter like advanced ones or user created are component only parameters and I need to label groups also. Don't want to model everything with components only.

Basically - if I have antyhing that I want to label by name - I will write the name in component Definition parameter. Groups don't have names, and that's fine.

I just need a tool to automatically put the Material Name in the instance parameter of each component and group. Original contents of Instance parameter can be deleted / substituted with Material Name.

Hope this clarifies.
0

ptasznick 
 

Re: Ruby coder needed. Custom plugin/script

Postby TIG » Mon Jan 23, 2023 12:42 pm

If you really want the component-instance or group to have a name after the container's material then its quite simple - a few lines of code...
I'll mock something up for you to try...
0
Last edited by TIG on Mon Jan 23, 2023 1:26 pm, edited 1 time in total.
Reason: Edited without reason on 23/01/2023
TIG
User avatar
TIG 
Global Moderator
 

Re: Ruby coder needed. Custom plugin/script

Postby TIG » Mon Jan 23, 2023 1:26 pm

Do you want it to work on all instances/groups [even nested ones] or on preselected ones ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Ruby coder needed. Custom plugin/script

Postby ptasznick » Mon Jan 23, 2023 3:25 pm

Best option is to for this to work on selected entities, with all nested components/groups inside this selection.
0

ptasznick 
 

Re: Ruby coder needed. Custom plugin/script

Postby TIG » Tue Jan 24, 2023 1:05 am

OK - give me a day or two [my personal life has unexpected complications] and I'll come back to you...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: Ruby coder needed. Custom plugin/script

Postby ptasznick » Tue Jan 24, 2023 10:14 am

That is most appreciated.
0

ptasznick 
 

Re: Ruby coder needed. Custom plugin/script

Postby TIG » Thu Jan 26, 2023 5:15 pm

Here's v1.0.0 of ContainerNameMaterial
Install the RBZ using the Extension Manager
Code is Set up by ContainerNameMaterial.rb.
Sets up menu item under Plugins|Extensions
When it's run it processes all selected containers [groups & instances] and their nested containers.
If the container has a material it's renamed to match.
Otherwise it's left unchanged.
One step undo-able...

It's not encrypted, so read the code RB file to see how it works...
1
TIG
User avatar
TIG 
Global Moderator
 

Re: Ruby coder needed. Custom plugin/script

Postby ptasznick » Fri Jan 27, 2023 11:11 am

Wow. Works flawlessly. Tested on different scenarios with different hierarchy and nested objects. Also - as expected - everything is 'taggable' in Layout.

Thank You very much.
0

ptasznick 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Developers' Forum

Who is online

Users browsing this forum: No registered users and 17 guests