Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LISP cut block on layer with polyline

14 REPLIES 14
Reply
Message 1 of 15
Fleww
809 Views, 14 Replies

LISP cut block on layer with polyline

Hi, I need LISP for my work so i can do this. From attachment "not cuted bad version how we get it" is version1 and I need it to make "Cut good version how we want it" make it version2.

So I need layer SERVICEBOX to be cutted in whole drawing to the layer Building navigated by layer Michror which is crossing that Building layer.

 

Is this possible, can someone help me please? This is very needed for my work. ❤️ 🙏

Tags (1)
14 REPLIES 14
Message 2 of 15
Kent1Cooper
in reply to: Fleww

I'm confused.  By "cut" do you mean "move"?  Or "trim"?  If you mean "trim," the Layer called "SERVICEBOX" in the "good" drawing is not what has been trimmed to the "Building" outline, but rather the "Michrorohr" Layer [which is spelled differently in your Message than in the drawings].  That is why I suspect "cut" means "move," because that is what has been done with things on the "SERVICEBOX" Layer, as it has been renamed from one drawing to the other -- there is no  "SERVICEBOX" Layer in the "bad" drawing, to have things on it moved [or trimmed?].  And in the "good" drawing, two of the Blocks near the middle do not have their insertion points on the "Building" Layer outline, as I think is your intent.  Are they not located where they should be, or is there some other reason they are where they are?  Or am I misunderstanding your description?  Is there someone more fluent in English who can write a description for you?

Kent Cooper, AIA
Message 3 of 15
Fleww
in reply to: Kent1Cooper

Kent1Cooper you have total right and Im sorry for confusing post.
 
 I thought the drawing would reveal everything.
 
 Yes I thought exactly what you asked if its true. I upload new drawing with corrected name SERVICEBOX which you noticed :), my fault. It just need to be on good version, I think you dont need more explanations right? Very sorry for first confusing message.
Message 4 of 15
WeTanks
in reply to: Fleww

don't need LISP
Try my method?

Please refer to the attached documnet.

We.Tanks

EESignature

A couple of Fusion improvement ideas that could your vote/support:
図面一括印刷

Message 5 of 15
Kent1Cooper
in reply to: Fleww

Still true from before:

  And in the "good" drawing, two of the Blocks near the middle do not have their insertion points on the "Building" Layer outline, as I think is your intent.  Are they not located where they should be, or is there some other reason they are where they are?

 

Also, some of the Blocks are connected with two Lines and a Point to the Trench path, but some by only one Line, making it very difficult to imagine how a routine could figure out what to do.  Those with a Point and a second Line all seem to end up with those at the insertion point of the Block on the Building perimeter, and the Line is of zero length -- is that really what you want?

Kent Cooper, AIA
Message 6 of 15
Fleww
in reply to: Kent1Cooper

Yes, thats what i need.

Message 7 of 15
marko_ribar
in reply to: Fleww

Just stab in the dark...

Have you tried command, or ACET Express Tool : CLIPIT... It should clip blocks with some curve and I suppose LWPOLYLINE should be very acceptable...

Marko Ribar, d.i.a. (graduated engineer of architecture)
Message 8 of 15
Kent1Cooper
in reply to: Fleww

Still true from before:

  Still true from before:

    And in the "good" drawing, two of the Blocks near the middle do not have their insertion points on the "Building" Layer outline, as I think is your intent.  Are they not located where they should be, or is there some other reason they are where they are?

 

If those two are treated as it seems you want the rest treated [i.e. Trim the Line that crosses the Building perimeter, and Move the Block so its insertion point is at the new Trimmed endpoint], then you would end up with this:

Kent1Cooper_0-1676903014521.png

If there is to be any hope of figuring out how to instruct a routine to do what you want, it will be necessary to have consistent criteria that it can use to decide [for example, among other things] whether or not to do that.  It occurred to me that maybe those should not be Moved because they have only one Line connecting to the Trench line, with no bend and no Point object.  But that can't be it, because there is another like that at the top, and unlike these two, that one is Moved in your "good" drawing.

Kent Cooper, AIA
Message 9 of 15
Fleww
in reply to: Fleww

cut1.png

cut2.png

  I need Lisp that will move and cut layer Servicebox(block) through layer which is connected to it in this case Microrohr(line), to the dot where it cross the line on layer Building(polyline).
This would help me alot in life, I just move it manualy for years at work.:/

Message 10 of 15
Kent1Cooper
in reply to: Fleww

What makes the two in the middle [-50 and -60 endings] different, so that they should not be changed as all the rest are?

Kent Cooper, AIA
Message 11 of 15
Fleww
in reply to: Kent1Cooper

thats my bad in presentation. forget about that 2. sorry for that 🙂
Message 12 of 15
Fleww
in reply to: Fleww

Can someone help me to solve this please?:) I tryed on whole internet and chatgpt4 but couldnt reach it. 😕

Message 13 of 15
Kent1Cooper
in reply to: Fleww


@Fleww wrote:

Can someone help me to solve this please? ....


Not I without more answers to questions raised.

Kent Cooper, AIA
Message 14 of 15
Fleww
in reply to: Kent1Cooper

forgot about that two (-50 and -60) I forgot to cut them on building too like others.
Message 15 of 15
Fleww
in reply to: Fleww

I know this is so complicated. thanks anyway 🙏😥

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report