Can I get a drawings projectpath var and then loo for that path using dbx?

Discussion in 'AutoCAD' started by James Maeding, Aug 9, 2004.

  1. I have a bunch of drawings that have xrefs with "bare" paths.
    The person who set them up used project paths, now I have to reconstruct what that path might have been.
    So, I want to open up the drawings through dbx,
    then get the projectname variable,
    then look at the preferences object to try to get that projects path.

    Now I can do everything but get a drawings ProjectPath variable through the object model.
    Anyone know how to do this?
    Remember, I dont want the path of a particular project, I want to the projectpath variable of a drawing.
    Its easy to confuse the two since vla-GetProjectFilePath seems like the right one.
    thanks
    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Aug 9, 2004
    #1
  2. that was "...go look" in the subject. I'm already loo (short for looney...)

    James Maeding <>
    |>I have a bunch of drawings that have xrefs with "bare" paths.
    |>The person who set them up used project paths, now I have to reconstruct what that path might have been.
    |>So, I want to open up the drawings through dbx,
    |>then get the projectname variable,
    |>then look at the preferences object to try to get that projects path.
    |>
    |>Now I can do everything but get a drawings ProjectPath variable through the object model.
    |>Anyone know how to do this?
    |>Remember, I dont want the path of a particular project, I want to the projectpath variable of a drawing.
    |>Its easy to confuse the two since vla-GetProjectFilePath seems like the right one.
    |>thanks
    |>James Maeding
    |>Civil Engineer/Programmer

    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Aug 9, 2004
    #2
  3. what, no responses? have I stumped the best of the best....

    James Maeding <>
    |>I have a bunch of drawings that have xrefs with "bare" paths.
    |>The person who set them up used project paths, now I have to reconstruct what that path might have been.
    |>So, I want to open up the drawings through dbx,
    |>then get the projectname variable,
    |>then look at the preferences object to try to get that projects path.
    |>
    |>Now I can do everything but get a drawings ProjectPath variable through the object model.
    |>Anyone know how to do this?
    |>Remember, I dont want the path of a particular project, I want to the projectpath variable of a drawing.
    |>Its easy to confuse the two since vla-GetProjectFilePath seems like the right one.
    |>thanks
    |>James Maeding
    |>Civil Engineer/Programmer

    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Aug 9, 2004
    #3
  4. James Maeding

    Jeff Mishler Guest

    James, once you have the Projectname and it is not "", the Project settings
    are stored in the registry under the profile it was created in. For
    instance, I just created a "test" project and this is the key that was
    created in the registry:
    HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R15.0\ACAD-138:409\Profiles\Land
    Desktop\Project Settings\test
    The key had the key named "RefSearchPath" with the value I had created.

    HTH
    --
    Jeff
    check out www.cadvault.com

    what that path might have been.
    projectpath variable of a drawing.
     
    Jeff Mishler, Aug 9, 2004
    #4
  5. James Maeding

    MP Guest

    but isn't the trick getting the ProjectName variable from the drawing with
    dbx in the first place?

    I've tried that in the past with no success so was waiting with baited
    breath for someone to answer James' question of how to get the System
    Variable"ProjectName" from a dwg via dbx.

    dbx will return some system variables(of those which are stored in the dwg)
    and not others in my experience
    I don't know the difference between the ones it can access and cannot
    access.

    but that's a good piece of info on where the paths' are stored, so far I've
    just used GetProjectFilePath and SetProjectFilePath to get those settings
    '
    lurking with interest
    Mark
     
    MP, Aug 10, 2004
    #5
  6. James Maeding

    j.buzbee Guest

    Correct me if I'm wrong - because I don't use projects - but the PROJECTNAME
    variable saves the name of the project saved in the registry which in turn
    saves the path. So if the project doesn't exist it's not much use getting
    the name?


    jb


    what that path might have been.
    projectpath variable of a drawing.
     
    j.buzbee, Aug 10, 2004
    #6
  7. James Maeding

    John Uhden Guest

    James:

    Please clarify. Do you mean the "ProjectName" variable, or the LDT project? If
    it's the "ProjectName" variable, then my guess is you can't access it via
    ObjectDbx because the (vla-getvariable) function won't work in that context

    Hope I'm wrong. :/




    projectpath variable of a drawing.
     
    John Uhden, Aug 11, 2004
    #7
  8. No, because the PROJECTNAME system variable is not stored
    in the DWG file to begin with. You can get it from the registry.
     
    Tony Tanzillo, Aug 11, 2004
    #8
  9. Oops. Sorry, PROJECTNAME is stored in the drawing. The
    paths are in the registry.

    Unfortunately, via ObjectDBX ActiveX, there is no access to
    drawing variables.

    However, AcadX does allow you to read them (via the
    AcadXDatabase.GetVariable() method).
     
    Tony Tanzillo, Aug 11, 2004
    #9
  10. No, you were right, I need the variable from the drawing.

    The reason I need this is to attempt to resolve what the xref path was on a drawing that has no xref paths.
    So I wanted to see what project (PROJECTNAME) the drawings were using and do something intelligent with that.

    I'll have to try Tony's tool.

    Hey Tony, I know life is uncertain, but could you comment on if you plan to keep your tools going for the next few acad
    versions at least? Thanks in advance.

    "John Uhden" <>
    |>James:
    |>
    |>Please clarify. Do you mean the "ProjectName" variable, or the LDT project? If
    |>it's the "ProjectName" variable, then my guess is you can't access it via
    |>ObjectDbx because the (vla-getvariable) function won't work in that context
    |>
    |>Hope I'm wrong. :/

    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Aug 12, 2004
    #10
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.