Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I've create 5 new custom borders named A4, A3, A2, A1 and A0. I've stored them in to template standard.dwg.
For older drawings I'd like to replace the border with one of the previous ones matching the sheet size.
If this can be done automatically that would be great, but I'm also satisfied if I get an arraylist with choices.
I've already created some code. It deletes the border and copies the resources from the template. It also comes up with an arraylist. As said, the arraylist is not neccessary.
Who can help me finishing the code?
'delete sheet formats Dim oDoc As DrawingDocument oDoc = ThisApplication.ActiveEditDocument Dim oCurrentNumber As Sheet oCurrentNumber = oDoc.ActiveSheet ' Iterate through the sheets, and delete the title blocks and symbols Dim oSheet As Sheet For Each oSheet In oDoc.Sheets oSheet.Activate Try oSheet.Border.Delete Catch 'catch error if no border found End Try ThisDrawing.ResourceFileName = "\\nlassapp04\Data\NXTdim\InvSet2016\Templates\standard.dwg" ThisDrawing.KeepExtraResources = True Dim resu1t As String="Result" Dim T1TLE As New ArrayList T1TLE.Add("A4") T1TLE.Add("A3") T1TLE.Add("A2") T1TLE.Add("A1") T1TLE.Add("A0") resu1t=InputListBox("Select Drawing Border", T1TLE, resu1t, _ Title := "Border", ListName := "Borders from Template") Next
Thanks in advance.
Wilson
Solved! Go to Solution.