Jump to content

sle7en7

Member
  • Posts

    173
  • Joined

  • Last visited

Posts posted by sle7en7

  1. Zoomer you can go crazy trying to find names to everything, I suggest adopt a standard either German construction organizations develop or you can use CSI OmniClass. I'm heading towards that direction. Just a suggestion though.

  2. +1 to this request, if we have a ready to go .sta available, it will be a huge aid. As a side note, is there anyone trying to adopt or have adopted a U.S. based system either published by AIA or NBIMS-US by NIBS (national institute of building sciences) to organize their class list? I'm curious...

  3. Right, so even if we change say for example the User-1 mapping of Glazing-Clear to Door-Glass and then setting User-1 as the naming standard, it won't solve our problem? What do you guys think, still no?

    If not, hopefully this is item is added to the WISHLIST, ehem* ehem*.

  4. My understanding is that the standard naming is already running on the background for the selected standard. For example when you create a PIO door it automatically assigns the glass used with the door to "Glazing>Clear". I have to manually change the PIO settings not to do this. Rather, if I change the Naming Standard to what I desire to be named then I wouldn't have to do this. Am I right? Please notice that I'm leaving "enable auto-classing" off.

  5. my understanding is that the standard naming is already running on the background for the selected standard. For example when you create a PIO door it automatically assigns the glass used with the door to "Glazing>Clear". I have to manually change the PIO settings not to do this. Rather if I change the Naming Standard to what I desire to be named then I wouldn't have to do this. Am I right?

  6. Aa, I understand, thanks a lot Hippo. You're talking python classes and objects im guessing? Still a bit hard I think, if you want it to behave like built-in plug-ins. You try to imitate as much as possible right? And in the end, it depends on your ability...

  7. How would one go about editing built-in plug-ins in VectorWorks. I want to create couple of custom tools but I want to build on top of the built-in ones. I don't want to mess with inner workings of VW but if I can find the code for the plug-ins then I can just duplicate them and use enhanced versions of it. Take for example the stake tool or any tool. With the stake tool, I want to display the X-coordinate if my symbol is rotated 0 or 180 degrees and Y-coordinate if my symbol is rotated 90 or -90 degrees. I believe there is much need for a tool like this but for any other tool where can I find their codes and how they work with VectorScript library? Thanks, much appreciated.

  8. I second this wish, please provide a bit more flexibility with this tool.

    Edit: For example providing precision as well. When I have a 3/4" rise over 24" run, it rounds it to .8 with base 24.

    • Like 1
  9. How can I use " ' " (single quote) mark as a delimeter for the substring function? I want to slice a string such as;

    15'10 1/4"

    to display only the 15 part.

    Eventually I want to add a "-" in between, looking like this finally;

    15'-10 1/4"

    I can't seem to get substring(text/function, ''',1) to work. Any help is appreciated... thanks

  10. Hey Pat,

    Say if I wanted to do Set_CoordinateField procedure for only the selected objects. What line of code do I need for that? I'm giving this (see code) a try but to no avail, it only does it for the first selected object obviously.

    Would a function like ForEachObjectInList or NumSelectedObjects come into play? If so how can I use them?

    Thanks a lot again

    Procedure Set_CoordinateField;
    
    const	MyRec = 'Column Line';
    	MyField = 'Number';
    
    var		Item_X, Item_Y:Real;
    
    Procedure MyProc(H2:Handle);
    
    Begin;
    	H2 := FSActLayer;  
    	IF (Abs(GetSymRot(H2)) = 90.0) THEN
    		Begin;
    			GetSymLoc(H2,Item_X,Item_Y);
    			SetRField(H2,MyRec,MyField,Num2StrF(Item_X));
    		End;
    	IF (Abs(GetSymRot(H2)) = 0.0) OR (Abs(GetSymRot(H2)) = 180.0) THEN
    		Begin;
    			GetSymLoc(H2,Item_X,Item_Y);
    			SetRField(H2,MyRec,MyField,Num2StrF(Item_Y));
    		End;
    End;
    
    Begin
    ForEachObject(MyProc,((R IN [MyRec])));
    End;
    
    Run(Set_CoordinateField);
    

  11. Ok I got it to work, you were right Pat, embedding IF statements... I'll get the hang of it someday.. those `begin`s and `end`s are driving me crazy...

    But this is what I have in VS (don't mind the naming conventions they are company used names, column line is the record and Number is the field where the coordinate is written)

    
    Procedure Set_CoordinateField;
    
    const	MyRec = 'Column Line';
    	MyField = 'Number';
    
    var		Item_X, Item_Y:Real;
    
    Procedure MyProc(H2:Handle);
    Begin
    	IF (Abs(GetSymRot(H2)) = 90.0) THEN
    		Begin
    			GetSymLoc(H2,Item_X,Item_Y);
    			SetRField(H2,MyRec,MyField,Num2StrF(Item_X));
    		End;
    	IF (Abs(GetSymRot(H2)) = 0.0) OR (Abs(GetSymRot(H2)) = 180.0) THEN
    		Begin;
    			GetSymLoc(H2,Item_X,Item_Y);
    			SetRField(H2,MyRec,MyField,Num2StrF(Item_Y));
    		End;
    End;
    
    Begin
    ForEachObject(MyProc,((R IN [MyRec])));
    End;
    
    Run(Set_CoordinateField);
    

    Then I tried to write the Python version, but failure... I don't get HANDLE's ...

    
    def Set_CoordinateField(MyRec, MyField):
    
    MyRec = 'Column Line'
    MyField = 'Number'
    Item_X = 0
    Item_Y = 0
    H2 = HANDLE
    
    if (abs(vs.GetSymRot(H2)) == 90.0):
    	vs.GetSymLoc(H2,Item_X,Item_Y)
    	vs.SetRField(H2,MyRec,MyField,vs.Num2StrF(Item_X))
    elif (abs(GetSymRot(H2)) == 0.0) or (abs(GetSymRot(H2)) == 180.0):
    	vs.GetSymLoc(H2,Item_X,Item_Y)
    	vs.SetRField(H2,MyRec,MyField,vs.Num2StrF(Item_Y))
    
    vs.ForEachObject(Set_CoordinateField,((R == [MyRec])))
    

    Also the file is attached Pat.

  12. Yep it is in VW 2015. but as you guys would suspect architects' wishes never end... For example I can't get the coordinate to show up and write some description with it... Or if I turn the stake into a symbol with a record attached, it defines another origin within the symbol frame. So my boss wants to display our custom symbol "stake" with a definition (e.g. Column Corner (C.C. for short)) and a coordinate dimension depending on the orientation of the symbol. So if the symbol is 0° or -180° rotated then, we want to see the XCoordinate,

    if it is 90° or -90° rotated then, we want to see the YCoordinate. I'm trying to write some conditional code to implement this to hundreds of coordinates on 10 floor plans but I'm failing somewhere, I think if you took a look at the code you might spot the small things I'm missing to get it right. It compiles but, only the YCoordinate gets implemented, or the YCoordinate always get implemented to put it another way. Anyway here is the code (credits to Pat of course):

    Procedure Set_CoordinateField;
    
    const	MyRec = 'Column Line';
    	MyField = 'Number';
    
    var		Item_X, Item_Y:Real;
    
    Procedure MyProc(H2:Handle);
    Begin
    	IF (GetSymRot(H2) = 90.0) OR (GetSymRot(H2) = -90.0) THEN
    		GetSymLoc(H2,Item_X,Item_Y);
    		SetRField(H2,MyRec,MyField,Num2StrF(Item_X));
    	IF (GetSymRot(H2) = 0.0) OR (GetSymRot(H2) = -180.0) THEN
    		GetSymLoc(H2,Item_X,Item_Y);
    		SetRField(H2,MyRec,MyField,Num2StrF(Item_Y));
    End;
    
    Begin
    ForEachObject(MyProc,((R IN [MyRec])));
    End;
    
    Run(Set_CoordinateField);
    
    

  13. Pat - thanks so much again. Since I'm not too familiar with VS or Pascal I'm getting stuck on basic stuff such as this. And on the contrary I started learning Python recently so if I have the time to develop something it would be in Python more often.

    Hippo - you're right, might as well turn it into a plug-in but that's gonna take a bit more time which I don't have right now. And if I decide to build a plug-in, I would try to do something more user-friendly and general purpose I guess, rather than just a menu command, like something which asks for input and pops up windows and what not. All in good time :)

    Anyhow thanks guys, I will let you know if I improve upon these.

  14. Hey Guys,

    This is what I have for now, as a little manual script application. I'm not familiar with VectorScript so I'm getting errors (expected DYNARRAY of CHARS) and also, I don't know how to convert the real value turned by the XCoordinate to my desired format display, which is something like this;

    ( ##'-## ##/##")

    But here is my script, I would love if somebody experienced in Vectorscript take a look at it.

    Procedure Set_CoordinateField;
    const	MyRec = 'COORDINATE';
    	My_Xcoordinate = 'x coordinate';
    	My_Ycoordinate = 'y coordinate';
    
    Procedure MyProc(H2:Handle);
    Begin
    	SetRField(H2,MyRec,My_Xcoordinate,XCoordinate(R IN [MyRec]);
    	SetRField(H2,MyRec,My_Ycoordinate,YCoordinate(R IN [MyRec]);
    End;
    
    Begin
    ForEachObject(MyProc,((R IN [MyRec])));
    End;
    
    Run(Set_CoordinateField);
    

  15. Is there a non-script way to bind a record format to its' symbol's x-coordinate?

    I want to display the x & y coordinates on a symbol where x & y point to the point of symbol insertion. Is there a way to this with worksheets (without much scripting) ?

    Please see the attached the file; as you would notice I can't assign the record format to the x-coordinate, it returns false naturally... is there a way to do this?

    Follow-up Question:

    Is there a way to turn the X-Coordinate called on a database header in to dimensional value? (e.g; 7'-6 3/8" prints 7.531 on the worksheet; how to keep it as 7'-6 3/8" ?)

    Thanks in advance.

  16. Alright, my worksheets start to corrupt after a while whenever I use cell merge and start shifting cells. I'm only using spreadsheet cells (no database headers) with simple strings punched in. I have 3 columns and many rows, whenever I merge couple of row cells and grab one of the rows and shift it up or down, I get patches gone out of my worksheet. What will be the cure or reason for this?

    Thanks.

    EDIT #1: see the images attached.

×
×
  • Create New...