Jump to content

boro

Member
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About boro

  • Rank
    Greenhorn

Personal Information

  • Location
    Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @MullinRJ thanks again for your help, works great! Here is an example on how to use the SetBinaryConstraint function with a symbol and a line. I had one symbol that gave me the "This constraint is not valid" message. All the others symbols I tried, worked just fine...I will look into this the next week. Keep in mind with this code you need to select the symbol first, then the line. PROCEDURE test_CCSymbolandLine; VAR symbolHandle, lineHandle :HANDLE; x1, y1, x2, y2 :REAL; index :INTEGER; containedObj :LONGINT; result :BOOLEAN; BEGIN {select the symbol first} GetPT(x1, y1); symbolHandle := PickObject(x1, y1); HCenter(symbolHandle, x1, y1); {then select the line} GetPT(x2, y2); lineHandle := PickObject(x2, y2); GetClosestPt(symbolHandle, x1, y1, index, containedObj); result := SetBinaryConstraint(1, symbolHandle, lineHandle, index, -1, 1, -1, containedObj, 0); message(result, ' ', GetTypeN(symbolHandle), ' ', GetTypeN(lineHandle)); END; RUN(test_CCSymbolandLine);
  2. Thanks for all the answers, I tried to automate the constrain coincident within a script, with no success. I always ended up with the message "This constraint is not valid", no matter on which object I tried it(Polygon, Polyline, Rectangle, Line). Unfortunately the VS Function Reference is not a great help. Here is my test code. PROCEDURE test; VAR pointX1 :REAL; pointY1 :REAL; pointX2 :REAL; pointY2 :REAL; symbolHandle1 :HANDLE; symbolHandle2 :HANDLE; result :BOOLEAN; BEGIN DSelectAll; GetPT(pointX1, pointY1); symbolHandle1 := PickObject(pointX1, pointY1); GetPT(pointX2, pointY2); symbolHandle2 := PickObject(pointX2, pointY2); result := SetBinaryConstraint(1, symbolHandle1, symbolHandle2, 0,0,0,0,0,0); END; RUN(test);
  3. Hi, I am trying to create a tool similar to the Flowchart Link Tool. This Tool is not as a standard tool in the Basic Toolset you can find it in the Plug-In Manager. Basically I would like to draw a polyline between two symbols and "connect" the endpoints of the line to the symbols. So when I move the symbols, the end point of the line moves with the symbol and the line will be scaled. I think I need to give the symbols a unique name (figured that out already) but I do not have any idea how to "connect" the point to the named object. Could anybody point me to the right direction and is this even possible with Vectorscript or do I need to use the SDK? Thanks!

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...