Author Topic: script to lunch vantage  (Read 610 times)

2024-11-20, 21:20:08

kino_unico

  • Active Users
  • **
  • Posts: 16
    • View Profile
Is there any script sequence to be able to create a button that runs the Vantage Live Link launcher?

2024-11-22, 16:22:50
Reply #1

Avi

  • Corona Team
  • Active Users
  • ****
  • Posts: 694
    • View Profile
You can try running this script.

Code: [Select]
macroScript StartVantageLink
category:"Corona 12 Update 1 Vantage Live Link"
buttonText:"Start VLink"
toolTip:"Start Corona Vantage Live Link"
(
    on execute do (
        Corona.CoronaFp.vantageLiveLink()
        messageBox "Vantage Live Link Started" title:"Corona Vantage"
    )
)

macroScript StopVantageLink
category:"Corona 12 Update 1 Vantage Live Link"
buttonText:"Stop VLink"
toolTip:"Stop Corona Vantage Live Link"
(
    on execute do (
        Corona.CoronaFp.vantageLiveLink()
        messageBox "Vantage Live Link Stopped" title:"Corona Vantage"
    )
)

fn printMessages = (
    print "Corona Vantage macroscripts created successfully!"
    print "To add buttons to interface:"
    print "1. Right-click on any toolbar/ribbon"
    print "2. Choose 'Customize'"
    print "3. In Category dropdown, select 'Corona 12 Update 1 Vantage Live Link'"
    print "4. Drag StartVantageLink and StopVantageLink to desired toolbar location"
)

printMessages()

Here's how to use it:

1. Run the above script in MAXScript editor (press F11)
2. Paste the script and click the Execute button (or press Ctrl+E)

Now to add the buttons to your interface:

1. Right-click on any toolbar in 3ds Max
2. Click "Customize"
3. In the dropdown menu labeled "Categories", scroll down and select "Corona 12 Update 1 Vantage Live Link"
4. You'll see two new buttons: "Start Corona Vantage Live Link" and "Stop Corona Vantage Live Link"
Just drag these buttons onto any toolbar you want

I hope this helps.

« Last Edit: 2024-11-23, 05:20:49 by Avi »
Arpit Pandey | chaos-corona.com
3D Support Specialist - Corona | contact us

2024-11-22, 16:50:27
Reply #2

CharlyRT

  • Active Users
  • **
  • Posts: 125
    • View Profile
I have logged this as an idea, hope we can get a proper Vantage toolbar or make the Original works in both engines
Carlos Rodriguez
RTstudio​
www.instagram.com/rtstudio.archviz/

2024-11-25, 12:38:27
Reply #3

kino_unico

  • Active Users
  • **
  • Posts: 16
    • View Profile
 It would be ideal for the same bar to work for both engines.

2024-11-25, 12:49:43
Reply #4

kino_unico

  • Active Users
  • **
  • Posts: 16
    • View Profile
ERROR

2024-11-25, 12:57:37
Reply #5

James Vella

  • Active Users
  • **
  • Posts: 645
    • View Profile
ERROR

looks like you forgot to close the second macro

2024-11-25, 23:18:05
Reply #6

kino_unico

  • Active Users
  • **
  • Posts: 16
    • View Profile
vale, lo he arreglado y mejorado
Code: [Select]
global isVantageLinkActive = false --
macroScript StartVantageLink
category:"Corona 12 Update 1 Vantage Live Link"
buttonText:"CVLink" -- Nombre del botón
toolTip:"CoronaVantage"
(
    on execute do (

        isVantageLinkActive = not isVantageLinkActive

        if isVantageLinkActive then (
            if Corona != undefined and Corona.CoronaFp != undefined and isProperty Corona.CoronaFp #vantageLiveLink then (
                try (
                    Corona.CoronaFp.vantageLiveLink()
                    messageBox "Vantage Live Link Started" title:"Corona Vantage"
                ) catch (
                    messageBox "Error: Unable to start Vantage Live Link!" title:"Corona Vantage"
                )
            ) else (
                messageBox "Error: Vantage Live Link function not found!" title:"Corona Vantage"
                isVantageLinkActive = false
            )
        ) else (
            messageBox "Vantage Live Link Stopped" title:"Corona Vantage"
        )
    )

    on isChecked return isVantageLinkActive
)