wbluem88 Posted February 8, 2010 Share Posted February 8, 2010 I'm working on a VBA that can match the linetype from one line to another. Ideally the program should prompt for the line to copy the linetype from, then prompt for the line to be updated. I've tried a couple routes but I'm having issues because the linetype for all the lines is "ByLayer". When lines are on different layers with different linetypes, the "ByLayer" doesn't exactly accomplish what I want it to... any thoughts? Public Sub Chgltype() Dim objBlock1 As AcadObject Dim objBlock2 As AcadObject Dim strLayer As String Dim varPoint As Variant ThisDrawing.Utility.GetEntity objBlock1, varPoint, vbCr & "Select line to copy linetype from: " ThisDrawing.Utility.GetEntity objBlock2, varPoint, vbCr & "Select line to be changed: " objBlock2.Linetype = objBlock1.Linetype End Sub Quote Link to comment Share on other sites More sharing options...
ReMark Posted February 8, 2010 Share Posted February 8, 2010 So you want the capability to change linetype regardless of what the layer calls for? Sounds dangerous to me. Quote Link to comment Share on other sites More sharing options...
wbluem88 Posted February 8, 2010 Author Share Posted February 8, 2010 I'm not making the call on the danger level, I'm just coding haha. I basically just need to be able to read what linetype a certain line is. It's almost always going to be ByLayer, so I probably need to identify what the linetype for that layer is. Right now the best idea I have is to code in the default linetype for all the layers, but I'm sure there's a better way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.