Adjust multiple Sample Line Swath Widths via autolisp?

Adjust multiple Sample Line Swath Widths via autolisp?

coopdetat
Advocate Advocate
688 Views
1 Reply
Message 1 of 2

Adjust multiple Sample Line Swath Widths via autolisp?

coopdetat
Advocate
Advocate

I have a large number of sample lines that I would like to change the swath widths for.  I am unaware of a direct method within AutoCAD for this.  I see that the IAeccSampleLine object has a Vertices property that appears to be the only object that determines the swath width. A dump of this object produces:

; IAeccSampleLineVertices: IAeccSampleLineVertices  interface
; Property values:
;   Count (RO) = 2
;   CountLeft (RO) = 1
;   CountRight (RO) = 1
I need to know how change the swath widths all at once and/or how to get and put the values for these Vertices.

 

---------------------------------------------Signature--------------------------------------------
Civil Design Professional Since 1983 (Intergraph), AutoCAD since 1989

Windows 10 Pro 64-bit Intel﴾R﴿ Core﴾TM﴿ i9-12900KF CPU 3.19GHz; 32 GB DDR4 4266 Dual Channel RAM
nVidia Quadro RTX 4000; AutoCAD Civil 3D 2023.2.1 Update
0 Likes
689 Views
1 Reply
Reply (1)
Message 2 of 2

Jeff_M
Consultant
Consultant

@coopdetat wrote:

I have a large number of sample lines that I would like to change the swath widths for.  I am unaware of a direct method within AutoCAD for this. 

 


In C3D you can edit many at once. Select a sample line, right-click, choose Sample Line Group Properties. Select the Sample Lines tab, then select the group of sample lines you want to edit the width(s) of:

5-22-2014 10-23-32 AM.png

 

Click on any one of the swath width values and enter the new width:

5-22-2014 10-23-58 AM.png

 

Hit Enter and all of those selected will update to the new width.

5-22-2014 10-24-17 AM.png

 

You can edit the other side's width now if desired.

 

As for doing this in Lisp, I attempted to write something in C3D2008 and could never get the sample lines to update. Perhaps things have gotten better in that department, but since this method has been added to the core product I never revisited the lisp route.

Jeff_M, also a frequent Swamper
EESignature
0 Likes