greneebb Posted April 27, 2018 Posted April 27, 2018 Good Night All. I want to reference an object after it has been created but I am unsuccessful. can anyone guide me how to achieve this objective? Here is the code that I used. I want to close the offset object. Dim OffsetObj As Variant OffsetObj = JoinedPlineObj8.Offset(3) Quote
BIGAL Posted April 29, 2018 Posted April 29, 2018 Good evening greneebb, Good night is saying goodbye. Do a google close plines. This took about 5 seconds. https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-ActiveX/files/GUID-C8AB9FB3-2B5C-4491-9ED7-E0A6F7EEBB3E-htm.html Quote
greneebb Posted April 29, 2018 Author Posted April 29, 2018 Thanks. I know how to close a Polyline. My problem is that after the polyline is offset I cannot do anything with the offset line because is does not respond to any methods. Its as thought it has no handle or accepts references Quote
BIGAL Posted April 30, 2018 Posted April 30, 2018 You need to look at the equivalent of (Entlast) in VBA this will return an object as an entity. Now to find an example. Quote
BIGAL Posted May 1, 2018 Posted May 1, 2018 I could not find a VBA get last equivalent and as I dont use VBA tried googling and the suggetsions were to use a selection set method which retrieved the last object created. Often there is a need to remember the last object created and do something with it, in lisp I use (setq obj2 (entlast)) The object may have been created as you want by doing an offset. I thought some one else may have posted a solution. Quote
dlanorh Posted May 1, 2018 Posted May 1, 2018 Good Night All. I want to reference an object after it has been created but I am unsuccessful. can anyone guide me how to achieve this objective? Here is the code that I used. I want to close the offset object. Dim OffsetObj As Variant OffsetObj = JoinedPlineObj8.Offset(3) From the Autocad Help Offset Method Return Value (RetVal) Type: Variant (array of objects) An array of the newly created objects resulting from the offset. Thus OffsetObj is an array with 1 element containing an object so you need to extract the object from the array first then you can close it Quote
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.