Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

pen assignments

Status
Not open for further replies.

Hmo

Electrical
Joined
Nov 1, 2003
Messages
42
Location
BE
hello,

i've written an vba-program for automatic plotting in autocad. The only thing i don't know how to do is programming for assigning a ctb-file.

does anyone know how it works?

mvgr
 
Here is a snippet of ours, it may be a help...

If ThisDrawing.ActiveSpace = acModelSpace Then
Set acObjSpace = ThisDrawing.ModelSpace
Else
Set acObjSpace = ThisDrawing.PaperSpace
End If

Set acLayout = acObjSpace.Layout
acLayout.RefreshPlotDeviceInfo 'Needed since we changed the plotter support paths

With acLayout
.ConfigName = strPrinter 'set printer first so options exist
.StyleSheet = strStyle
.CanonicalMediaName = strPaperName
.PlotType = acPltType 'must be set before centerplot property
.PlotOrigin = dblPltOrigin 'this must come before centerplot
.CenterPlot = blnCtr
.PaperUnits = acMillimeters 'default----
.PlotRotation = acPlotRota
.StandardScale = dblPaperScl
.UseStandardScale = True
SetPlotParameters = True
End With

"Everybody is ignorant, only on different subjects." — Will Rogers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top