HELP~ SELECT OBJ BY BITMAP NAME IN SELECTION

HI!
I have a script:

theObjs = #()
for i in (getclassinstances bitmaptexture) where (filenamefrompath i.filename) == "FXT4.jpg" do (join theObjs (refs.dependentNodes i))
select theObjs

I want select theObjs in selection.
How should i do this?
Help me please~~

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pixamoon's picture

`

try this one:

theObjs = #()
selObjs = selection as array
 
for o in (getclassinstances bitmaptexture) where toLower (filenameFromPath o.filename) == toLower "FXT4.jpg" do 
(
  for ref in (refs.dependentNodes o) where findItem selObjs ref > 0 do append theObjs ref
)
 
select theObjs

Best,
Pixamoon

mrgrmo's picture

cant you help me?

I bought your Copy paste DWG. I have introduced to my company. This is very good!!!
Now, my company need attach mesh script. If successful, I will buy it.
Requirements of the script:
I have 2~n mesh object.
I want mesh attachlist from (a) to all objects (n).

(a):
-the object have a bitmap in material.
-the object's material only one in (n). Ex: (a)'s material=MK17, (b)'s material=ZA75, (c)'s material=ZA75 -> attach from (a).
-the selection object.

Can you help me? Please!

Ps: My English very bad. Sorry~. Can we work via email?

mrgrmo's picture

thankiu very much!!!

thank you very much!!!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.