greneebb Posted February 3, 2020 Share Posted February 3, 2020 (edited) Good Morning All, I am used to offsetting Polyline Objects. However I would like to offset a Straight line and then use that line's properties. This is not working out. Generally the variable that receives the offset for a polyline must be a variant type because the polyline is comprised of several objects. However I expect that when a line of AcadLine type is offseted it should produce a variable of similar type, i.e AcadLine type. If this is the case, then the general properties of a line can be accessed. I am not getting this to happen. This is my sample code. Here everything works fine, except for the last line. Here is the error message it generates: Object doesn't support this property or method. Can anyone tell me if I my objective can be achieved? Public Sub OffsetLine(ByRef Botline As AcadLine) Dim BotLineOffset As Variant Dim ItemBot As Variant Dim ItemBotCoordinates() As Double BotLineOffset = Botline.Offset(-Offset) Set ItemBot = BotLineOffset(0) ItemBot.Color = acYellow ItemBotCoordinates = ItemTop.Coordinates End Sub Edited February 3, 2020 by greneebb Correction Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 3, 2020 Share Posted February 3, 2020 (edited) Start and end point, Coordinates is supported property of plines. Use dumpit.lsp to see properties available . There should be an equivalent in VBA. ;;;===================================================================; ;;; DumpIt ; ;;;-------------------------------------------------------------------; ;;; Dump all methods and properties for selected objects ; ;;;===================================================================; (defun C:DumpIt ( / ent) (while (setq ent (entsel)) (vlax-Dump-Object (vlax-Ename->Vla-Object (car ent)) ) ) (princ) ) Edited February 3, 2020 by BIGAL 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.