Creating multiple saved views

Good Morning,

I'm trying to create multiple saved views from a list of coordinates, thank you to Volker to helping me to date with this! I have been made aware that it is possible to use the camera to set a position and then create a saved view from that. this works fine if you are trying to create a couple of saved views however I'm trying to create 30 or 40.. from what I understand of the camera node, it applies a camera position to a view between 3 and 8 therefore anything more than 5 saved views it wont do.

Does anybody have any ideas that might help?

Thanks in advance

Tom .

  • Hello Tom, I have been looking into it and am checking whether anyone knows the secret handshake to make this work the way you and I seem to think it should work.
    Regards,
    Volker

       

  • Hi Tom,

    I'll file an enhancement so that a camera can save more views and leave them behind.

    Meanwhile, the first few steps of the approach are correct.  Saving the views then needs to be done by using a key-in.  GenerativeComponents can issue Key-in commands to the application via the built-in KeyIn function.  A sample script transaction would look like this:

    transaction script 'Generate Saved Views'
    {
        Camera thisCam = new Camera("ViewGenCamera");
        int viewNum = 3;
        thisCam.ViewNumber = viewNum; 
        
        for (int i = 0; i < EyePoint.Count; ++i)
        {
            string viewName2 = "SavedView" + ToString(i + 1);
            thisCam.EyePoint = EyePoint[i];
            thisCam.TargetPoint = Target; 
            UpdateGraph();
            string keyInString = "namedview save " + viewNum + " " + viewName2 + " GCSavedView";
            KeyIn(keyInString);
            UpdateGraph();
        }
    }


    This generates as many views as there are replicated points in EyePoint (which must exist before inserting and executing this piece of script). Similarly a node "Target" of type Point must exist. This could a be a replicated point like EyePoint, and then would be indexed, as well.

    I hope this provides you with sufficient information to achieve what you were trying to achieve.

    Best success!

    Volker

       

    Answer Verified By: L 

  • Thank you for your help again!

    I seem to be getting an error that doesn't make much sense to me, any ideas ?

    i'm sure it is a 'user' error.

    thanks in advance for your help!

  • Hi Tom,

    How do you recognize that there is an error? At what point in running the script does it appear and how does it manifest itself? Are there any error messages, and what do they say?

    Regards,

    Volker

       

  • The error appears when i paste the script into the keyin function - Command script editor..

    when I press ok it says " invalid use of the keyword 'transaction'"