Jump to content

DCarpenter

Member
  • Posts

    117
  • Joined

  • Last visited

Posts posted by DCarpenter

  1. Can someone explain why this simple program is crashing my VW? No matter if I change the varible 'pt' to POINT or VECTOR, or if I change the GetPtL to GetPt, it still crashes. On execution of the script it rubberbands a line to my cursor and waits for the next point. After clicking on the screen which should complete the execution of the script, my PIO icon still appears to be depressed and my pull down menus are greyed out. So I click three more random places on the screen and VW crashes. Even the example script for GetPtL on the http://developer.vectorworks.net page crashes my VW. I've tried restarting my computer, zapping the P Ram, still nothing seems to help. Is it just me or does it happen for you too?

    PROCEDURE TEST2;

    VAR

    pt: POINT;

    BEGIN

    GetPtL(0,0,pt.x,pt.y);

    END;

    RUN (TEST2);

  2. I created the script below that creates a closed polygon and a rectangle, both with a gradient fill. After execution and converting the PIO to a group, both objects show (in the attribute palette) that they have a gradient fill, but on the screen the gradient only appears in the rectangle. If I select the poly and open the gradient dialog box and click preview the gradient appears. Why doesn't the gradient appear on both objects after the execution of the script. Any ideas?

    PROCEDURE Gradient1;

    VAR

    SegmentIndex:INTEGER;

    h,i: HANDLE;

    BEGIN

    {---------------------------------------------Create gradient}

    h:= CreateGradient('Black-White');

    SegmentIndex:=1;

    SetGradientData(h,SegmentIndex,0,0.5,0,0,0);

    SegmentIndex:=2;

    SetGradientData (h,SegmentIndex,.75,1,255,255,255);

    {-------------------------------Sets fill pattern to gradient}

    FillPat(-Name2Index('Black-White'));

    {-------------------------------------------------Create poly}

    ClosePoly;

    Poly(0,0, 0,100, -100,100, -100,0);

    SetFillOriginPoint(LNewObj,0,50);

    SetFillIAxisEndPoint(LNewObj,-100,50);

    {--------------------------------------------Create rectangle}

    Rect(0,0,100,100);

    Redraw;

    END;

    RUN (Gradient1);

  3. I was finally able to get my gradient to map correctly using:

    SetFillOriginPoint(handle,AGRAD.x,AGRAD.y); {begining point of the gradient}

    SetFillIAxisEndPoint(handle,BGRAD.x,BGRAD.y); {ending point of the gradient}

    but wound up not having to use SetFillJAxisEndPoint(handle,AGRAD.x,AGRAD.y); in my script.

    Dave

  4. I was finally able to get my gradient to map correctly using:

    SetFillOriginPoint(handle,AGRAD.x,AGRAD.y); {begining point of the gradient}

    SetFillIAxisEndPoint(handle,BGRAD.x,BGRAD.y); {ending point of the gradient}

    but wound up not having to use SetFillJAxisEndPoint(handle,AGRAD.x,AGRAD.y); in my script.

    Dave

  5. Raymond,

    Thanks for your response, I apologize for not seeing it earlier. Unfortunately I'm very familiar with the same headaches you had years ago. I'm still in the process of figuring things out but the functions below have been helpful so far. We'll see how far they get me.

    SetFillIAxisEndPoint

    SetFillJAxisEndPoint

    Still figuring things out, I'll keep you updated...

    Dave

  6. After making a rectangle and adding a gradient, I would typically use the Attribute Mapping Tool to manipulate the gradients exact placement, but what procedure or function do I use to do that in a script?

    After drawing it in VW and exporting the VScript I've found this string of commands below helpful. I understand what 74 is and the number after it but I have no idea what 71 and 72 are suppose to be or do.

    objectHandle := LNewObj;

    result := Name2Index(gradientName1);

    SetObjectVariableReal (objectHandle,74,0);

    SetObjectVariableReal (objectHandle,71,0);

    SetObjectVariableReal (objectHandle,72,76.2);

    Any help would be appreciated.

    Dave

  7. Simple question:

    I've created a PIO that does a number of things, one of which is inserting a hybrid symbol. After it inserts the symbol, using SYMBOL(); I want to move that symbol along the z axis using Move3DObj();, but for some reason I've forgotten how to get the handle of the symbol that I've just inserted. All this is happening inside the PIO.

    How do I get the handle of the freshly inserted hybrid?

  8. Mike m oz:

    Thanks for your reply. I didn't know you could crack open the *.dwf's, I think a very few of my vendors would be sophisticated enough to do that but I don't think there's anything like that for VW. My vendors still need to add their own things to the drawings on their own layers. I do use pdf's, but a vendor can't add their own symbols to that.

    Robert Anderson:

    Thanks for the "data release form" idea, I'll share that with my upper Management but I think they were looking for something less formal. I totally agree with you that any protected media can be cracked. I was hoping maybe there was something like an internal "lock" within VW that could keep any resources from leaving, but would allow vendors to add symbols to the drawing. Kind of like a one-way street. If this was possible it would keep out 95 percent of my vendors from accessing the Resource Palette.

  9. Over the past years our company has noticed outside vendors and competitors using symbols and a color palette that we?ve created. My questions is, is there any way I can protect our symbols from being taken from outside people when we have to share our VW document with them?

    Could you possible ?Lock? or password protect the Resource Palette from being accessible by others?

    Have you ever heard of a script that could secure the drawing and it?s resources?

    Is a AutoCAD *.dwf file similiar to what I'm looking for in VectorWorks?

    Looking forward to hearing your comments.

    Dave

  10. I'm trying to create a symbol pull down menu in VW, but am having problems writing the script for it. The script has to be able to go get a specific symbol from a specified folder on the hard drive and then insert it into the drawing. But I'm not sure that VW can do this.

    Can anyone tell me if this is possible and maybe point me in the right direction?

×
×
  • Create New...