Author Topic: Plot 'Property'  (Read 2045 times)

0 Members and 1 Guest are viewing this topic.

M-dub

  • Guest
Plot 'Property'
« on: January 27, 2009, 03:15:29 PM »
In the layer manager, it is easy to control which layers get plotted and which ones don't, but is it possible to apply that same property to individual objects instead of entire layers?

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Plot 'Property'
« Reply #1 on: January 27, 2009, 03:17:23 PM »
No, but there are a few programs out there (LSP/VBA) that turn on/off individual entities.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Plot 'Property'
« Reply #2 on: January 27, 2009, 03:24:50 PM »
I still have this.... Allows you to select objects to turn the "off" and also turns on all objects that have been turned off.

Code: [Select]
Option Explicit

Public Const strProduct_Control = "Visibility"
Public Const strVersion_Control = "  v2000.01"


Sub ObjectVisOn()
    Dim objElem As Object
    Dim objLayer As Object
    Dim objLayers As Object
    Dim objNewSS As Object
    Dim dblPT1(0 To 2) As Double
    Dim dblPT2(0 To 2) As Double
    Dim strCurrLayer As String
    Dim intGPC(0) As Integer
    Dim varGPV(0) As Variant
   
    intGPC(0) = 60
    varGPV(0) = 1
   
    Set objLayers = ThisDrawing.Layers
    Set objNewSS = ThisDrawing.SelectionSets.Add("VBA")
    objNewSS.Select acSelectionSetAll, dblPT1, dblPT2, intGPC, varGPV
   
    For Each objElem In objNewSS
        If objElem.Visible = False Then
            strCurrLayer = objElem.Layer
            Set objLayer = objLayers.Item(strCurrLayer)
            If objLayer.Lock Then
                objLayer.Lock = False
                objElem.Visible = True
                objLayer.Lock = True
            Else
                objElem.Visible = True
            End If
        End If
        objElem.Update
    Next
   
    MsgBox "Done Processing entire drawing.", vbInformation, strProduct_Control & strVersion_Control
   
    If Not objNewSS Is Nothing Then
        objNewSS.Delete
    End If
End Sub

Sub ObjectVisOff()
    Dim objNewSS As Object
    Dim strCurrLayer As String
    Dim objLayer As Object
    Dim objLayers As Object
    Dim SSentity As Object

    Set objLayers = ThisDrawing.Layers
   

    Set objNewSS = ThisDrawing.SelectionSets.Add("VBA")
    objNewSS.SelectOnScreen
    For Each SSentity In objNewSS
        strCurrLayer = SSentity.Layer
        Set objLayer = objLayers.Item(strCurrLayer)
        If objLayer.Lock Then
            objLayer.Lock = False
            SSentity.Visible = False
            objLayer.Lock = True
        Else
            SSentity.Visible = False
        End If
        SSentity.Update
    Next
   
    MsgBox "Done Processing: " & Str(objNewSS.Count) & " Drawing Objects", vbInformation, strProduct_Control & strVersion_Control
   
    If Not objNewSS Is Nothing Then
        objNewSS.Delete
    End If
End Sub
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

M-dub

  • Guest
Re: Plot 'Property'
« Reply #3 on: January 27, 2009, 03:38:38 PM »
Nah...
That's no good.  :(

I have a client's logo that has some 'white' in it that I'm trying to set to not print.  I didn't want to have to add another layer just to utilize that option.  Didn't want anything extra, including code.

Many thanks for the offer though.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Plot 'Property'
« Reply #4 on: January 27, 2009, 03:41:09 PM »
The code I posted above uses the object's visibility property - you won't need another layer.

Have you tried setting the part that you don't want to plot to color 255?  Or is it 256??  One of those is supposed to NOT plot (or plot white - which, on white paper would be, well.... white).
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

M-dub

  • Guest
Re: Plot 'Property'
« Reply #5 on: January 27, 2009, 03:46:25 PM »
I think the issue is with AutoCAD 2002.  I actually used a custom colour (253, 253, 253) and it prints out fine in 2009, but when they print it on the 2002 machine up in the office, they get a black blob because the .ctb file has everything printing to black.
The other option was to simply delete the 'white' hatch from the block, but then it doesn't "look good" on the screen.

I just really wish that the plotting property was just that.... a property that could be turned on or off.  ( I thought it was! )