deleting hyperlinks
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
deleting hyperlinks

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
Sean
Guest





Posted: Wed Dec 29, 2004 7:38 pm    Post subject: deleting hyperlinks Reply with quote

Hi all:
I am using vba to add hyperlinks to block objects. It works great. Now, I am
trying to make a simple button that will make a selectionset of all blocks
and then Delete any and all hyperlinks. Here is what i have so far, but it
is not working. Any ideas? Thanks. Sean

Dim ss As AcadSelectionSet
Dim intCode() As Integer
Dim varCodeValue() As Variant
Dim objBlock As AcadBlockReference
Dim Hyperlinks As AcadHyperlinks
Dim Hyperlink As AcadHyperlink

Set ss = CreateSelectionSet
ReDim intCode(0)
ReDim varCodeValue(0)
intCode(0) = 2
varCodeValue(0) = "p-label-size"

ss.Select acSelectionSetAll, , , intCode, varCodeValue

For Each objBlock In ss
On Error Resume Next
Set Hyperlinks = objBlock.Hyperlinks
Hyperlink.delete
Next

Back to top
Ed Jobe
Guest





Posted: Wed Dec 29, 2004 9:09 pm    Post subject: Re: deleting hyperlinks Reply with quote

You set the Hyperlinks object but not the Hyperlink object. You have to
iterate the Hyperlinks collection.

--
----
Ed
----
"Sean" <span@hello.com> wrote in message news:41d2c171_3@newsprd01...
Quote:
Hi all:
I am using vba to add hyperlinks to block objects. It works great. Now, I
am
trying to make a simple button that will make a selectionset of all blocks
and then Delete any and all hyperlinks. Here is what i have so far, but it
is not working. Any ideas? Thanks. Sean

Dim ss As AcadSelectionSet
Dim intCode() As Integer
Dim varCodeValue() As Variant
Dim objBlock As AcadBlockReference
Dim Hyperlinks As AcadHyperlinks
Dim Hyperlink As AcadHyperlink

Set ss = CreateSelectionSet
ReDim intCode(0)
ReDim varCodeValue(0)
intCode(0) = 2
varCodeValue(0) = "p-label-size"

ss.Select acSelectionSetAll, , , intCode, varCodeValue

For Each objBlock In ss
On Error Resume Next
Set Hyperlinks = objBlock.Hyperlinks
Hyperlink.delete
Next

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB