Jump to content

Recommended Posts

Posted

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)

Posted

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

Posted

You need to look at the equivalent of (Entlast) in VBA this will return an object as an entity. Now to find an example.

Posted

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.

Posted
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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...