Toggle xRef Scenes / xRef Objects

Hello all,

So of course i'm aware that you can just get to the xRef Scenes / xRef Objects by going through File -> Reference.

But i like to toggle the xRef Scenese / xRef Objects by using a script. I have my own "summary script" in which i like to include them.

So i'm looking for the function to toggle these two, unfortunately i couldn't find these online. Hopefully you can help me :)

Thank you.

Comments

Comment viewing options

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

.

I am glad to help.
Happy New Year!!! :)

remykonings's picture

*

Also, i’m noticing that you use an @ in your FileIn function while i am not. Might that make a difference?

miauu's picture

.

There si two ways to use path to folder/files with maxscript:

@"C:\Users\MyUserName\Desktop\NewFolder\xRefOpenFileIn.ms"
-- or
"C:\\Users\\MyUserName\\Desktop\\NewFolder\\xRefOpenFileIn.ms"

Since, copyed path from the Windows explorer not contains "\\" it is easyer to put @ in front of the path and not add \ where it is needed.

remykonings's picture

*

I’ll try it out when i’m at work again in a few days. Besides the fact that you make a macroscript of it, put the function between brackets and that you make a button out of it. It seems all the same. The function is loaded from a file over a network drive but i wouldn’t see why that would be a problem here.

remykonings's picture

I’m sorry that is my fault. I

I’m sorry that is my fault. I explained it a bit confusing because i wrote Toggle. What I like to just open the xRef Scenes / xRef Objects through maxscript.

Thanks miauu

miauu's picture

.

For xRef scene:

(
	xRefScn = xrefs.getXRefFile 1	
	--	"disable"
	xRefScn.disabled = true
	--	"enable"
-- 	xRefScn.disabled = false
)
remykonings's picture

I’m sorry that is my fault. I

I’m sorry that is my fault. I explained it a bit confusing because i wrote Toggle. What I like to just open the xRef Scenes / xRef Objects through maxscript.

Thanks miauu

Comment viewing options

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