×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Leader not needed

Leader not needed

Leader not needed

(OP)
How can I remove the leader added by SW when I insert a block, using VB?

Andrew

RE: Leader not needed

What version of SW are you using?

I think that the leader option is defined in the block definition. In SW2001+, the leader option is presented in the Property Manager when you insert the block.

DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.

RE: Leader not needed

Forgot this. If you want to remove the leader from a block that is already inserted, just right-click the block and the toggle is available in the Properties of the object.

DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.

RE: Leader not needed

(OP)
dsi,

I know that. What I do is I insert a block attached to a drawing view using a VB program. I would like the block to be inserted without the leader added automatically by SW or use some API commands to remove it after insertion. I couldn't find anything helpful in the SW API help.

Andrew

RE: Leader not needed

Sorry about that.

That should be controlled by the Annotation::SetLeader2 method. The Annotation Object is a level above the CustomSymbol Object.

DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.

RE: Leader not needed

(OP)
I'm trying to use the following code to eliminate the leader added by SW:

Private Sub cmdXXXX_Click()
Part.InsertCustomSymbol "I:\Solid Works Lib\ATI-SW Data\Mark.sldsym"
Set AView = Part.ActiveView
Set MarkX = AView.GetFirstCustomSymbol
Set XXXXAnn = MarkX.GetAnnotation
junk = XXXXAnn.SetLeader2(0, 0, 0, 0, 0, 0)
Part.ClearSelection
End Sub

I get the following error at line:

Set MarkX=AView.GetFirstCustomSymbol

"Object doesn't support this property or method"

and I don't understand why?

Andrew

RE: Leader not needed

(OP)
I'm trying to use the following code to eliminate the leader added by SW:

Private Sub cmdXXXX_Click()
Part.InsertCustomSymbol "I:\Solid Works Lib\ATI-SW Data\Mark.sldsym"
Set AView = Part.ActiveView
Set MarkX = AView.GetFirstCustomSymbol
Set XXXXAnn = MarkX.GetAnnotation
junk = XXXXAnn.SetLeader2(0, 0, 0, 0, 0, 0)
Part.ClearSelection
End Sub

I get the following error at line:

Set MarkX=AView.GetFirstCustomSymbol

"Object doesn't support this property or method"

and I don't understand why?

Andrew

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources