Visual Basic Customization
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
*TomD
SetWindowT oPlot Coordinate s
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
195 Views, 4 Replies
11-30-2006 01:16 PM
Does anyone know a reason that 9000 or so would be added to coordinates
passed to SetWindowToPlot?
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
Set oPltConf = ThisDrawing.PlotConfigurations("DwfExport")
With oPltConf
.PlotType = acWindow
.SetWindowToPlot dLowLt, dUprRt
.UseStandardScale = True
.StandardScale = acScaleToFit
End With
If I do a -PLOT at the command line, the coordinates are 'shifted' from what
was passed. I've verified this by drawing a line to the points used above.
No UCSs are present...........I'm stumped. The distance between the lower
left/upper right is good.........just shifted 9000 units.
passed to SetWindowToPlot?
ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
Set oPltConf = ThisDrawing.PlotConfigurations("DwfExport")
With oPltConf
.PlotType = acWindow
.SetWindowToPlot dLowLt, dUprRt
.UseStandardScale = True
.StandardScale = acScaleToFit
End With
If I do a -PLOT at the command line, the coordinates are 'shifted' from what
was passed. I've verified this by drawing a line to the points used above.
No UCSs are present...........I'm stumped. The distance between the lower
left/upper right is good.........just shifted 9000 units.
*TomD
Re: SetWindowT oPlot Coordinate s
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-30-2006 01:47 PM in reply to:
*TomD
In case anyone else stumbles across something like this, the following 'work
around' does work, but I would like to know the true answer to the original
post
Dim sPlotString As String
sPlotString = "-plot yes" & vbCr & vbCr & vbCr & vbCr & vbCr & vbCr &
vbCr & vbCr & _
Format(dLowLt(0), "0.00") & "," & Format(dLowLt(1),
"0.00") & vbCr & _
Format(dUprRt(0), "0.00") & "," & Format(dUprRt(1),
"0.00") & vbCr & _
vbCr & vbCr & vbCr & vbCr & vbCr & vbCr & _
sDwfNam & vbCr
If Dir(sDwfNam) <> "" Then sPlotString = sPlotString & "Y" & vbCr
sPlotString = sPlotString & "n" & vbCr & "y" & vbCr
ThisDrawing.SendCommand sPlotString
While googling this problem earlier this afternoon I came across an old
(several years) post of mine about a similar issue. I've used the
SetWindowToPlot in a couple of other macros without problem since then, so
I'm wondering what I'm missing with all of this.
around' does work, but I would like to know the true answer to the original
post
Dim sPlotString As String
sPlotString = "-plot yes" & vbCr & vbCr & vbCr & vbCr & vbCr & vbCr &
vbCr & vbCr & _
Format(dLowLt(0), "0.00") & "," & Format(dLowLt(1),
"0.00") & vbCr & _
Format(dUprRt(0), "0.00") & "," & Format(dUprRt(1),
"0.00") & vbCr & _
vbCr & vbCr & vbCr & vbCr & vbCr & vbCr & _
sDwfNam & vbCr
If Dir(sDwfNam) <> "" Then sPlotString = sPlotString & "Y" & vbCr
sPlotString = sPlotString & "n" & vbCr & "y" & vbCr
ThisDrawing.SendCommand sPlotString
While googling this problem earlier this afternoon I came across an old
(several years) post of mine about a similar issue. I've used the
SetWindowToPlot in a couple of other macros without problem since then, so
I'm wondering what I'm missing with all of this.
Re: SetWindowT oPlot Coordinate s
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-14-2008 08:55 AM in reply to:
*TomD
Hay Tom,
The year is 2008, the month is May and the cad version is AutoCAD 2008.
Guess what, I just spent five days trying to solve the same problem. So I guess Autodesk well fix this problem in the AutoCAD 3008.
Thanks for the Post Tom.
-J
The year is 2008, the month is May and the cad version is AutoCAD 2008.
Guess what, I just spent five days trying to solve the same problem. So I guess Autodesk well fix this problem in the AutoCAD 3008.
Thanks for the Post Tom.
-J
Re: SetWindowT oPlot Coordinate s
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-29-2013 03:03 PM in reply to:
*TomD
1-29-2013, using AutoCAD 2012... and I'm experiencing this issue on 'some' drawings. Again, no UCS is present... it just doesn't make any sense.
Re: SetWindowT oPlot Coordinate s
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-29-2013 03:44 PM in reply to:
absStructural
Well - in case anyone else runs across this... I found the answer here: http://forums.autodesk.com/t5/Visual-Basic-Customi
In short, SetWindowToPlot expects the values in DCS (Display Coordinate System). DCS is not always equal to WCS - so you have to translate the points from WCS to DCS. I am still a bit puzzled by the fact that 95% of the time (if not more) DCS == WCS.
