how to modify dictionary items....

Discussion in 'AutoCAD' started by naumanmy, Jan 31, 2005.

  1. naumanmy

    naumanmy Guest

    We had an old plotter which is now gone, but I wanted to see if I can update our pagesetups programatically.

    with a routine Ian Bryant wrote and modifying it I can get to the individual pagesetups, but Iam not sure how to modify them.

    Basically I want to change the PC3 file (DXF 2) from XXXX-Oce to XXX-LArgeF and DXF 4 the page size to a matching pagename on the new plotter. The later thing change I think would be the DXF 7 which is the ctb fiel and that also needs to change as well.

    any help would be appreciated. thanks

    here is what I got

    Command: (dictsearch (namedobjdict) "acad_plotsettings")
    ((-1 . <Entity name: 400dfcc8>) (0 . "DICTIONARY") (5 . "19") (102 .
    "{ACAD_REACTORS") (330 . <Entity name: 400dfc60>) (102 . "}") (330 . <Entity
    name: 400dfc60>) (100 . "AcDbDictionary") (280 . 0) (281 . 1) (3 . "GBBN -
    OCE") (350 . <Entity name: 400e44a0>) (3 . "GBBN-KIP 24x36") (350 . <Entity
    name: 400e4748>) (3 . "GBBN-KIP 30x42") (350 . <Entity name: 400e4750>) (3 .
    "GBBN-KIP 36x48") (350 . <Entity name: 400e4758>))

    (setq ps_lst nil ps_lst
    (apply 'append
    (mapcar '(lambda (x)
    (if (equal (car x) 350)
    (list (cdr x))
    ))
    (dictsearch (namedobjdict) "acad_plotsettings")
    )
    )
    )
    (<Entity name: 400e44a0> <Entity name: 400e4748> <Entity name: 400e4750>
    <Entity name: 400e4758>)

    Command: (entget (nth 2 ps_lst))
    ((-1 . <Entity name: 400e4750>) (0 . "PLOTSETTINGS") (5 . "A62") (102 .
    "{ACAD_REACTORS") (330 . <Entity name: 400dfcc8>) (102 . "}") (330 . <Entity
    name: 400dfcc8>) (100 . "AcDbPlotSettings") (1 . "GBBN-KIP 30x42") (2 .
    "GBBN-KIP.pc3") (4 . "Special_E1_(42.00_x_30.00_Inches)") (6 . "A803") (40 .
    5.0776) (41 . 5.0776) (42 . 5.07764) (43 . 5.07764) (44 . 1066.8) (45 . 762.0)
    (46 . 5.08) (47 . 9.398) (48 . 0.0) (49 . 0.0) (140 . 41.5312) (141 . 28.8663)
    (142 . 1.0) (143 . 1.0) (70 . 688) (72 . 0) (73 . 0) (74 . 4) (7 . "GBBN -
    ColorBW.ctb") (75 . 16) (147 . 1.0) (148 . 0.0) (149 . 0.0))


    I tried using the ActiveX as well but I get errors on it Invalid input.

    Command: (Setq psa (nm_ent2vla (nth 0 ps_lst)))
    #<VLA-OBJECT IAcadPlotConfiguration 04596c44>

    Command: (vlax-dump-object psa)
    ; IAcadPlotConfiguration: A named collection of plot settings
    ; Property values:
    ; Application (RO) = #<VLA-OBJECT IAcadApplication 00a8a730>
    ; CanonicalMediaName = "ARCH_expand_E1_(30.00_x_42.00_Inches)"
    ; CenterPlot = 0
    ; ConfigName = "GBBN-OCE.pc3"
    ; Document (RO) = #<VLA-OBJECT IAcadDocument 00f2f6ec>
    ; Handle (RO) = "984"
    ; HasExtensionDictionary (RO) = 0
    ; ModelType (RO) = 0
    ; Name = "GBBN - OCE"
    ; ObjectID (RO) = 1074676896
    ; ObjectName (RO) = "AcDbPlotSettings"
    ; OwnerID (RO) = 1074658504
    ; PaperUnits = 0
    ; PlotHidden = 0
    ; PlotOrigin = (0.0 0.0)
    ; PlotRotation = 1
    ; PlotType = 5
    ; PlotViewportBorders = 0
    ; PlotViewportsFirst = -1
    ; PlotWithLineweights = -1
    ; PlotWithPlotStyles = -1
    ; ScaleLineweights = 0
    ; ShowPlotStyles = 0
    ; StandardScale = 16
    ; StyleSheet = "GBBN-Oce.ctb"
    ; UseStandardScale = -1
    ; ViewToPlot = "plot"
    T

    Command: (vlax-dump-object psa)*Cancel*

    Command: (vla-put-property)
    ; error: no function definition: VLA-PUT-PROPERTY

    Command: (vlaz-put-property)
    ; error: no function definition: VLAZ-PUT-PROPERTY

    Command: (vlax-put-property)
    ; error: too few arguments

    Command: (vlax-put-property )'_.help ; error: too few arguments

    Command: 'VLIDE
    Command:
    Command: *Cancel*

    Command: *Cancel*

    Command: (vlaz-put-property psa 'CanonicalMediaName
    "Special_E1_(42.00_x_30.00_Inches")
    ; error: no function definition: VLAZ-PUT-PROPERTY

    Command: (vlax-put-property psa 'CanonicalMediaName
    "Special_E1_(42.00_x_30.00_Inches")
    ; error: Automation Error. Invalid input

    Command: (vlax-put-property psa 'ConfigName "GBBN-KIP.pc3")
    ; error: Automation Error. Invalid input

    Command: atoms

    Initializing...
    Type "Atoms" to run.

    Command:
    Command: (vla-put-canonicalmedianame psa "GBBN-KIP.pc3")
    ; error: Automation Error. Invalid input

    Command: (vlax-dump*Cancel*

    Command: (vla-get-canonicalmedianame psa)
    "ARCH_expand_E1_(30.00_x_42.00_Inches)"

    Command: (vla-put-configname psa "GBBN-KIP.pc3")
    ; error: Automation Error. Invalid input
     
    naumanmy, Jan 31, 2005
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.