Copy groups on dft & paste to the background of another dft

Valued Contributor
Valued Contributor

hello,

I try to make a programm with VB.

It will copy a group (blocks "aaa") of a draft ("d:\dftstd.dft") and pste to the backround of another draft

( SolidEdgeFramework.Application.ActiveDocument)

I make a lot of test but I always cant select the group "aaa"

 

I begin in programming and I'm french so exuse my explication and my english

 

Thanks for the help

 

PS: I work with SE V20

 

 

Posted by: THIBAUD EMMANUEL
Post date: 1/13/2011 10:50:13 PM

1 REPLY

RE: Copy groups on dft & paste to the background of another dft

Valued Contributor
Valued Contributor

Here is sample VB6 code to get you started.

 

Select the group and then run the program. Selected group will be copied into a background sheet.

 

Please let me know if you need more help.

 

 

Sub main()

 

Dim seApp As SolidEdgeFramework.Application

 

Dim dftDoc As DraftDocument

 

Set seApp = GetObject(, "Solidedge.application")

Set dftDoc = seApp.ActiveDocument

 

Dim dftSheet As Sheet

Set dftSheet = dftDoc.ActiveSheet

' Dim grps As Groups

 

' Set grps = dftSheet.Groups

 

Dim ss1 As SelectSet

 

Set ss1 = dftDoc.SelectSet

 

ss1.Copy

 

dftDoc.Sections.BackgroundSection.Sheets(1).Activate

 

seApp.StartCommand (DetailEditPaste)

 

dftSheet.Activate

 

ss1.RemoveAll

 

End Sub

 

Posted by: Sanjay Kulkarni
Post date: 1/15/2011 11:35:33 PM