Jump to content
Sign in to follow this  
orlando Teixeira

"Extended Trim"

Recommended Posts

Hello PPl

i posted this allready on Architect but as it seems more likely my answers will come from here i doubled it it, sorry

i worked with cad and we had an "extended trim" that would do something like a mix between vectorworks trim and split(trim by line). Althought the clip tool is almost there too...

trim only do a part, and split does not let you select a poly or even a line and clip will do what i want but i have to draw th line myself and i wanna use and existing poly or line of course.

Something like

step 1: select a polyline or line

step 2: select the side to cut

and it cut all the objects (lines, polys, circles, etc)

do ya know anything alike?

p.s. i tryied the vectorscript example below on vw2010 sp3 and it didnt worked.

it just says click to insert and then it began to draw a poly.....




polyHandle :HANDLE;

lineHandle :HANDLE;

resultHandle :HANDLE;

begPt :VECTOR;

endPt :VECTOR;


CallTool(-204); polyHandle := FSActLayer;

CallTool(-201); lineHandle := FSActLayer;

GetSegPt1(lineHandle, begPt.x, begPt.y);

GetSegPt2(lineHandle, endPt.x, endPt.y);

Split2DObjectByLine(polyHandle, begPt.x, begPt.y, endPt.x, endPt.y, resultHandle);

resultHandle := CreateDuplicateObject(resultHandle, NIL);



Share this post

Link to post

But now i ask if one can use an script to use this and erase all the lines and poly's from a pre-select side of the poly?


1) script will call that menu trim (ctrl+t or command+t)

2) colect data from those lines and polys splited

3) select side to cut (or as in split to retain)

4) regadering the data colected it will erase those lines and polys

or perhaps if there where the SPLIT script available anyware adapt to use an poly ou line.

is this possible ?


Share this post

Link to post

Yes this should be possible to do with a script, but it is going to be a very large and complicated script and probably slow.

Since the Trim command does not select or change the state of objects that are trimmed there is no easy way to determine what objects should be deleted. Even the getting which side gets complicated unless you require vertical or horizontal cuts.

My gut feeling is that this script would run between 1000 and 2000 lines of code. I am a pretty good programmer and my speed is about 20 lines a hour by the time you are done with all the debugging. If you really need this you need to be willing to pay for 50 to 100 hours of someone's time or devote at least that much time yourself. If you are really lucky you might find someone who sees a need for this script and be willing to do it cheap or free. I know I don't have the time to do this even if you had the money.

I have one idea that I am checking. If it works out, then this might only be a 100 line script. But don't hold you breath. It is not looking promising.

Share this post

Link to post

HEllo PAt,

allways the truth, i like that. thank you.

i am not that desperate, once you get used to some tools you get adicted and as moving to another program and not have them it gets a bit complicated.

I know i can do the same with clip tool but i have to do all the work. with extrim (extended trim) it was preety simple to just select a line or poly, select the side and voil? all the objects touching that line or poly where cuted.

well got try harder to undrstand vectorscript and perhaos comeday i will find the answer.

Thx Pat.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  


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...