Jump to content

nippaz

Member
  • Posts

    10
  • Joined

  • Last visited

Posts posted by nippaz

  1. @Pat Stanford Thank you for the caveat.  While this is something weighing heavily on my mind, it seems I haven't given it enough thought.  Naively I thought this PIO would just drop a Truss Symbol that I could then copy/paste all over the place and use the snapping points to line up.  Benefit here also would be that I had someplace cleaner to store my symbols.  But I will take your advice and look into Data Tags

     

    @michaelk Once again, Thank you MichaelK.  You helped me greatly in my adventures with worksheets and now this.  I will investigate the Data Tag option and report back with what I find.  In the meantime, thank you both.  Dimension2 looks wonderful.  I will also download that and incorporate it into my files.  Maybe find a way to tweak it a bit, aesthetically speaking of course.

  2. On 12/6/2017 at 8:40 AM, Pat Stanford said:

    A symbol is never going to be be able to have data accessible from the Shape pane. In order to do this you are going to need to create a PlugIn Object.

     

    The basic idea is that you will create a "Parameter Record" that has fields similar to the ones in your custom record that you access through the data pane. You then use these "Parameters" in your script by prefixing the field names with "P" They then act just like other variables, but can be changed by the script.

     

    I have attached a very simple PIO that shows an editable text field on the Shape pane. This PIO simply inserts a locus point and labels it with the custom text and the distance from the origin.

     

    Drop the .VSO file into your User folder, Plug-ins and restart VW (Not necessarily required, but a good idea.) Then edit your workspace to include the new tool.

     

    You can use the Tools:Plug-ins:Plug-in Manager to modify the object. Go to the Custom Plug-ins tab and you should see the Distance from 00 plug in listed. Click the Edit Script button to see the script. Click the Edit Definition button and go to the Parameters tab to see the parameters. Parameter 1 (Controlpoint01X and ControlPoint01Y) are automatically generated based on the type of Plug-in it is. The MyText is something I have added to have it show in the OIP.

     

    The PIO is intended to be used at a scale of something like 1/4". If you use it at 1:1, the label will end up about 3" away from the locus point.

     

    Hopefully this gets you started. Write back if you need more help.

    Distance from 00.vso

     

    Hello Pat, many thanks in advance.  I have been on and off on the forums with questions to help my workflow.  Creating a PIO to insert symbols has constantly been in the back of my mind with a few usages in mind.

     

    I work in the entertainment industry and as such use Truss almost daily.  As I print the plots for install, I have found it useful for the end user if I had a plot with Truss Builds denoting what each stick of Truss is.  I currently am using a custom set of symbols for Truss and noticed if I insert the Truss Length into the symbol, I can turn the visibility on/off through the use of classes, however as I edit the symbol and need to rotate truss, the font gets rotated as well.  Through research, it has been suggested that by making a PIO that inserts my truss symbol, I can achieve class visible length markers that do not rotate with the truss.  Where can I gather more help on creating a PIO for this purpose?

     

    Secondly, I had contacted Sam Jones about a possible PIO similar to the one you reference here.  I wanted to drop a locus point on my drawing that shows distance from origin, much like his Chain Hoist Tool shows distance from origin.  He mentioned needing to understand EventAware.  I just downloaded your example, but does your example do just this?

     

    Thank you

  3. @michaelk Very informative.  I appreciate you taking the time.  I will watch this over and over.

     

    Questions:

     

    1. The 3D symbol that represents the hoist...it looks oddly similar to the one used in the Chain Hoist Tool, is this something you scripted or is it built into Vectorworks

     

    2. I seem to be having a fair amount of trouble creating worksheets to work as yours works.  What's the correct method in doing so?

     

    Thank you much.

  4. On 7/6/2015 at 3:32 PM, Pat Stanford said:

    What you don't say is the requirements for using the script.

    1. You must have a record in the file named "COORDINATE" in the file.

    2. That record must have fields named "x coodinate" and "y coodinate"

    3. The record must be attached to each object to want to locate prior to running the script.

    4. All the script does is move the X and Y coordinates (insertion point) of the object into the COORDINATE record. Anything else you do with them from there is separate.

    So, you formatting of the output of the data will depend on how you are using the record data. A good first step would be to edit the Coordinate format and make sure the x and y fields are defined as Numbers and formatted as Dimensions (click the Format button). The format of the display should then automatically flow from the Unit settings of the file.

    If you are using a worksheet make sure the column (or cells) displaying the data is/are also formatted as Dimension.

    Two other hints:

    1. For a script with this few lines, I would hard code the Record and Field names rather than assigned them to variables. Yes if you have to edit the names you have to change them in two places rather than one, but to me it makes the script easier to understand.

    2. I would try to make Record and Field names a single string without the spaces. i.e. x_coordinate rather than x coordinate. There are places where a single "word" can be used without the surrounding quotes necessary when you have spaces.

    Here is a script that actually runs. There is no default fields for X and Y in MyRec, so it can't get the data. You have to use some sort of command to query the object and get that data and store it not the record. In this case I chose GetSymLoc, but depending on the object type you have that might or might not get you the point you are interested in.

     

    
    Procedure Set_CoordinateField;
    const	MyRec = 'COORDINATE';
    	My_Xcoordinate = 'x coordinate';
    	My_Ycoordinate = 'y coordinate';
    
    var		Item_X, Item_Y:Real;
    
    Procedure MyProc(H2:Handle);
    Begin
    	GetSymLoc(H2,Item_X,Item_Y);
    	SetRField(H2,MyRec,My_Xcoordinate,Num2StrF(Item_X));
    	SetRField(H2,MyRec,My_Ycoordinate,Num2StrF(Item_Y));
    End;
    
    Begin
    ForEachObject(MyProc,((R IN [MyRec])));
    End;
    
    Run(Set_CoordinateField);
    In my attempt to learn this exactly, @sle7en7 @Pat Stanford would either of you mind explaining 'MyRec'? I can't locate it as a function.
     
    The Line Procedure MyProc(H2:Handle); - again here, what's MyProc? What does H2 refer to? and why is 'Handle' important?  I'm just trying to understand the use of the arguments.
     
    @Pat Stanford you mention "1. For a script with this few lines, I would hard code the Record and Field names rather than assigned them to variables. Yes if you have to edit the names you have to change them in two places rather than one, but to me it makes the script easier to understand." What do you mean by Hard Coding 'Record and Field' names rather than assigning them variables?
     
    I apologize for the newb question.

     

     

  5. @@Pat Stanford  @Sam Jones  I basically want to mimic the Chain Hoist Tool, but with far fewer options.  Drop an object (2D/3D Symbol) and upon dropping the object into my drawing, have the following options:

     

    Hoist Size (1/4 T, 1/2T, 1T, 2T) -- would be a dropdown that changes the symbols for each corresponding motor size to either a Diamond, Triangle, Circle, or a Square - much like the Chain Hoist Tool

    Distro Color -- can be a dropdown; also changes the color surrounding the symbol as in the attached symbol drawings

    Circuit Number (1 - 8) -- can be a dropdown

    Motor Cable Length (50', 75', 100', 125', 150') -- can be a dropdown

    Hang Type (Dead Hang, Bridle, Spanner) -- can be a dropdown

    A record label that keeps track of the coordinates with reference to the origin -- I love this aspect of Chain Hoist, I can refer to any point and it'll display the coordinates

    Trim Heights

     

    I have corresponded with Sam and the aspect of the chain Hoist Tool that allows for Origin Reference to be displayed every time the symbol is moved has to do with Event Aware...something I haven't been able to find any information on through Google but would really love to have.

     

    I think the Chain Hoist Tool is a great tool.  Well thought out and very thorough.  For my uses however, it becomes a little too thorough as I don't need to know the motor's manufacturer, phasing, speed, voltage, controller location, chain runners and connector type.  I love how it's implemented and would like to create/script a tool/plugin that largely mimics it.  If that is OK with Sam.

     

    I would eventually love to learn how to use worksheets to print out each motor's location with reference to a user origin, cable length, hang type, and such to speed up my Pre Production process.

     

    With this in mind, along with Event Aware, I also spoke with Sam about using that aspect of the Chain Hoist Tool and creating a tool/plugin that acts as the Stake Object.  Something similar to the loci tool that I can leave marks at my scenery locations that would display the coordinates, again with reference to a user origin.  If I haven't lost all my hair at this point, I would love to have a button that could clear all dropped points.  I suppose I can CTRL-A and delete, but this would prevent me from accidentally deleting scenery items.  Maybe through the use of classes?  Assigning all location points to a class and just deleting the class?

     

    I apologize if my understanding of the subject is so basic.  But I'm really trying to learn.

     

    Also, attached is a PDF of a small set of symbols I would like to use.

     

    @markdd Thank you for the suggestion, I will look into this as well.

    New Symbols.pdf

  6. Thank you for your response.  I work as a Production Rigger and I group my motors and motor distros by colors.  Since playing with the Chain Hoist tool from Sam Jones, I was intrigued with the ability of the Chain Hoist tool however the color grouping options were limited (4 or 5 colors if I recall).  Hence started my journey down this path. 

     

    Other options I am looking into are learning to script with Vectorscript, however I keep reading and am getting nowhere fast.  I think I need a watered down 'Dummies' version to get started.  Now that I look back, even Sam Jones had a page of each symbol instance included with the Chain Hoist tool.  I guess I know what I want but because I can't script and don't know how to start, I don't know how to begin.  Like with basic HTML you have your <html> <body> and what not... Apologies for the rant.

     

    But I do thank you for your help.

     

    Not to be drifting off topic too much, but I've followed the links in the searches of Vectorscripting and so far have found myself going round and round in circles.

     

    And in response to your signature, I am interested in Scripting.

     

    BTW, is the Chain Hoist tool really a tool?  Or is it a plug-in?

     

    Thank you.

  7. I've been playing with this for a while.  I would like to create a symbol that has the ability to change the fill in 2 different parts of the symbol.  Any chance this can be achieved with 'Color by Class'?  I am repeating symbols and denoting their function through the use of colors.  In the past, I have had to draw up each symbol in the color combinations desired and Copy/Paste each symbol when I need.  Hoping to consolidate the symbols page of my 'Template'.

     

    Thank you.

×
×
  • Create New...