Jump to content

MTRobin

Member
  • Posts

    147
  • Joined

  • Last visited

Posts posted by MTRobin

  1. Hi Everyone,

     

    Can someone please give me an example on how to create a script to insert a symbol at a specific location and place it on a specified layer? I am trying to automate common symbols I place on drawings and having them auto allocate to their layers.

     

    In this example I am trying to place a table symbol at 0'-0", 0'-0", 0'-0" on the "Staging" layer and a lighting console symbol inserted as a lighting device at 0'-0", -8'6 1/2", 3'7 3/8" on the "Lighting" layer.

     

    Any help would be appreciated.

     

    Thank you,

    Maxwell

  2. 17 minutes ago, Jesse Cogswell said:

    To create a viewport on the current layer, the script is as easy as:

    
    viewHand:=CreateVP(ActLayer);

    The viewHand variable (or whatever you want to call it) is a handle to the viewport so that you can set crop and visibilities using SetVPCropObject, SetVPClassVisibility and SetVPLayerVisibility.  The ActLayer command will return the handle to the currently active layer.

    Thank you. I got this to work, but it's not quite what I'm looking for. This creates a Viewport on the current layer, but what I am trying to achieve is to open the "Create Viewport" dialogue to place a viewport on a sheet layer.

     

    Thank you,

    Maxwell

  3. On 2/22/2021 at 6:05 PM, JBenghiat said:

    Could you please help me set these up? I don't have much experience with handles. I want to use the handle of the currently selected layer. Pretty much just recreate the DoMenuTextByName commands.

     

    Thank you,

    Maxwell

  4. Hi Everyone,

     

    This script keeps crashing Vectorworks when I execute it. I have it as a custom plugin, assigned to a menu drop down, and typically recall it through a hotkey. I tried isolating the line that is giving me issues by commenting out all the others and it looks like the "Create Viewport" command is the culprit. I also tried adding wait commands at different sections of the script and that didn't help either. I was hoping someone could help diagnose what I am doing wrong.

     

    The script is designed to turn off dark background, turn off layer colors, change the layer options, set the render mode to wireframe, and then create a viewport and open the viewport dialogue window.

     

    SetPref(16, FALSE);
    SetPref(11, FALSE);
    SetPrefint(506, 3);
    DoMenuTextByName('Wireframe Render Chunk', 1);
    DoMenuTextByName('Create Viewport',0);

     

    Thank you,

    Maxwell

  5. I am struggling to get this script to work. I was hoping someone could look over my script and see how I can fix these errors.

     

    Thank you!

     

    PROCEDURE LayerOptionToggle;
    
    VAR
    LayerOption:INTEGER;
    
    BEGIN
        LayerOption:=GetPrefint(506, 6);
        
    IF (LayerOption = 3) THEN
        SetPrefint(506, 6)
    ELSE
        SetPrefint(506, 3)
    END;
    
    RUN(LayerOptionToggle);

     

     

    image.thumb.png.ecd5ff0c2fec475722b11d624f73dcab.png

  6. How do I set the defaults for a Hang Position?

     

    When I select some truss objects and convert to hanging positions I would like to popup to already assume "Create a dingle hanging position from all selected objects."

     

    I would also like to set the "Show Name" Boolean to false as the default value in the OIP.

     

    Thank you,

    Maxwell

  7. Hi Everyone,

     

    I am looking at the new Viewport Label Style and want to add a field that shows the viewport's view. So if I the viewport is in a front view it will display "Front" and if I change it to a top view it will say "Top". This would work exactly like the scale.

     

    Thanks

     

    Maxwell

  8. I currently use a script to accomplish this, but that workaround is a bit cumbersome when going back and forth between different design and sheet layer saved views. I also use the Quick Preference, but if I forget to turn Layer Colors off BEFORE going into a sheet layer, sometimes my title block or other lines will get stuck in their color and then publishing gets all messed up. I figured if Vectorworks just handled this on it's own it would smooth the whole process.

  9. Hi Everyone,

     

    I draft with the layer color setting toggled on in my design layers, but when I switch to my sheet layers I want the setting to automatically turn off so the lines are true colors. Then when I go back into a design layer it toggles back to my last setting, in this case it would be to layer colors turned on. Exactly how AutoCAD does it. Is this possible?

     

    Thank you,

    Maxwell

  10. Hi!

     

    I am trying to set the default "Show beam at" parameter in a lighting device to "Falloff Point" and when I go into Spotlight Preferences, the attribute default pop-up is blank and there are no options to set the default when I click the dropdown arrow. Any thoughts on why that is and how I can set the default parameter? I attached a screenshot for reference.

     

    Thank you,

    Maxwell

    Show Beam at Default.jpg

×
×
  • Create New...