Leader not needed
Leader not needed
(OP)
How can I remove the leader added by SW when I insert a block, using VB?
Andrew
Andrew
When was the last time you drove down the highway without seeing a commercial truck hauling goods?
Download nowINTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: Leader not needed
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
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
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
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
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
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