Send command trim

Send command trim

Anonymous
Not applicable
1,369 Views
1 Reply
Message 1 of 2

Send command trim

Anonymous
Not applicable

Hello everyone,

 

I wrote some lines of code to shorten a contour from each side by value of X (User input). I used the send command "_trim". All works fine while the contour is in the right upper quart of the coordinate system...so X and Y value is positive (Have a look at the attached picture)Upper case: works / Lower case: does notUpper case: works / Lower case: does not

Heres the part of the code I use:

 

        Dim Pnt1(0 To 2)  As Double
        Dim Pnt2(0 To 2)  As Double
        Dim det1 As String, det2 As String
        
'StWert is the input value give by the user, default StWert=1 'If StWert < 0 Then 'Trimmen 'Trimme objMinX to offsetObj1/ objMaxX to offsetObj2 'Ermittle Schnittpunkte Pnt1(0) = pbas(0) - Abs(StWert) / 2: Pnt1(1) = pbas(1): Pnt1(2) = 0 'objMinX mit offsetObj1 Pnt2(0) = pbas2(0) + Abs(StWert) / 2: Pnt2(1) = pbas2(1): Pnt2(2) = 0 'objMaxX mit offsetObj2 'Trimmen 1 'Quelle: https://forums.autodesk.com/t5/visual-basic-customization/breaking-lines-with-vba/td-p/347214 det1 = "(handent " & Chr(34) & HandleOffsetObj1 & Chr(34) & ")" det2 = "(list(handent " & Chr(34) & objMinX & Chr(34) & ")(list " & Str(Pnt1(0)) & Str(Pnt1(1)) & Str(Pnt1(2)) & "))" ThisDrawing.SendCommand "_trim" & vbCr & det1 & vbCr & vbCr & det2 & vbCr & vbCr

 

Can anyone give me a hint?

 

Thanks in advance!

 

0 Likes
1,370 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Any new ideas for me in this issue?

0 Likes