• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk DWF Viewer

    Reply
    *Zach

    Express Viewer and linking to database or excel

    144 Views, 9 Replies
    04-01-2003 11:56 PM
    We're doing some low end GIS work for clients and last night they asked if
    it's possible to click on a hyperlink attached to a valve (Lets call it
    V-100) and it pulls up a database that has info for the valves in the entire
    system. Is there a way when the database is pulled up, it highlights the
    info for V-100 or is this not possible?

    Thanks

    --
    remove .ns to email
    Please use plain text.
    *Autodesk\

    Re: Express Viewer and linking to database or excel

    04-02-2003 12:13 AM in reply to: *Zach
    It entirely depends on how the hyperlinks are authored into the DWF and what
    your database app does with the hyperlinks when it receives them. I don't
    think this is a function of the viewer, really.

    "Zach" wrote in message
    news:664D71739D5CF14F586CCB2596C70127@in.WebX.maYIadrTaRb...
    > We're doing some low end GIS work for clients and last night they asked if
    > it's possible to click on a hyperlink attached to a valve (Lets call it
    > V-100) and it pulls up a database that has info for the valves in the
    entire
    > system. Is there a way when the database is pulled up, it highlights the
    > info for V-100 or is this not possible?
    >
    > Thanks
    >
    > --
    > remove .ns to email
    >
    >
    >
    >
    Please use plain text.
    *Zach

    Re:

    04-02-2003 03:10 AM in reply to: *Zach
    How would you go about doing something like that then?

    --
    remove .ns to email


    Jeffrey Klug (Autodesk) wrote in
    message news:3FB31B669244F2F21A4E688AFA8491F3@in.WebX.maYIadrTaRb...
    > It entirely depends on how the hyperlinks are authored into the DWF and
    what
    > your database app does with the hyperlinks when it receives them. I don't
    > think this is a function of the viewer, really.
    >
    > "Zach" wrote in message
    > news:664D71739D5CF14F586CCB2596C70127@in.WebX.maYIadrTaRb...
    > > We're doing some low end GIS work for clients and last night they asked
    if
    > > it's possible to click on a hyperlink attached to a valve (Lets call it
    > > V-100) and it pulls up a database that has info for the valves in the
    > entire
    > > system. Is there a way when the database is pulled up, it highlights
    the
    > > info for V-100 or is this not possible?
    > >
    > > Thanks
    > >
    > > --
    > > remove .ns to email
    > >
    > >
    > >
    > >
    >
    >
    Please use plain text.
    *Lone, Peter

    Re:

    04-02-2003 03:27 AM in reply to: *Zach
    If you were doing it in ASP.NET, you could attach a
    hyperlink to the valve that directed it to an ASPX page with some argument/value
    pairs.  You could then use the ASPX page to query your database and display
    the results.

     

    For example, say the valve in question is
    V-100.  You could attach a URL to the valve in the drawing like
    so:


     

    You would then publish the DWF to a web page. 
    When the user picked on the link, it would open up the
    QUERYVALVE.ASPX page.  As part of the
    face="Courier New">Page_Load
    code behind, you could 1) Assign
    Request.QueryString("valve_id") to a variable,
     2)  Setup the database connection, 3) Assemble and execute the
    SQL to bring back the valve information in a dataset, and 4) Traverse the
    dataset to display the resultant data onto the page using
    face="Courier New">Response.Write
    .

     

    HTH,

     

    :smileytongue:

     

     

    > How would you go
    about doing something like that then?
    >
    > --
    > remove .ns to
    email
    >
    >
    > Jeffrey Klug (Autodesk) <jeffrey dot klug at
    autodesk dot com> wrote in
    > message

    href="news:3FB31B669244F2F21A4E688AFA8491F3@in.WebX.maYIadrTaRb">
    face=Arial
    size=2>news:3FB31B669...

    face=Arial size=2>...
    > > It entirely depends on how the hyperlinks are
    authored into the DWF and
    > what
    > > your database app does with
    the hyperlinks when it receives them.  I don't
    > > think this is a
    function of the viewer, really.
    > >
    > > "Zach" <

    href="mailto:kkacadman@yahoo.com.ns">
    size=2>kkacadman@yahoo.com.ns
    > wrote in
    message
    > >

    href="news:664D71739D5CF14F586CCB2596C70127@in.WebX.maYIadrTaRb">
    face=Arial
    size=2>news:664D71739...

    face=Arial size=2>...
    > > > We're doing some low end GIS work for
    clients and last night they asked
    > if
    > > > it's possible to
    click on a hyperlink attached to a valve (Lets call it
    > > > V-100)
    and it pulls up a database that has info for the valves in the
    > >
    entire
    > > > system.  Is there a way when the database is
    pulled up, it highlights
    > the
    > > > info for V-100 or is this
    not possible?
    > > >
    > > > Thanks
    > >
    >
    > > > --
    > > > remove .ns to email
    > >
    >
    > > >
    > > >
    > > >
    > >
    >
    >
    >
    >
    Please use plain text.
    *Zach

    Re:

    04-02-2003 04:03 AM in reply to: *Zach
    Hey Peter.

    SO the only way to do this is with HTML code and not just with attaching a
    URL to text and plot to the DWF? I'm not a programmer so it seems I'm
    getting over my head already. The URL to the DWF file is
    C:\mapping\filename.dwf, so would the URL to attach be
    C:\mapping\filename.dwf?valve id=V-100 ? Probably not...

    --
    remove .ns to email


    Peter Lone wrote in message
    news:E5303EC7C8A512D7EC68AC4026A70321@in.WebX.maYIadrTaRb...
    > If you were doing it in ASP.NET, you could attach a hyperlink to the valve
    that directed it to an ASPX page with some argument/value pairs. You could
    then use the ASPX page to query your database and display the results.
    >
    > For example, say the valve in question is V-100. You could attach a URL
    to the valve in the drawing like so:
    > http://myserver/mydir/queryvalves.aspx?valve_id=V-100
    >
    > You would then publish the DWF to a web page. When the user picked on the
    link, it would open up the QUERYVALVE.ASPX page. As part of the Page_Load
    code behind, you could 1) Assign Request.QueryString("valve_id") to a
    variable, 2) Setup the database connection, 3) Assemble and execute the
    SQL to bring back the valve information in a dataset, and 4) Traverse the
    dataset to display the resultant data onto the page using Response.Write.
    >
    > HTH,
    >
    > :smileytongue:
    >
    >
    > "Zach" wrote in message
    news:7DFB86F9E1E45EB355B084A89A3DDC0A@in.WebX.maYIadrTaRb...
    > > How would you go about doing something like that then?
    > >
    > > --
    > > remove .ns to email
    > >
    > >
    > > Jeffrey Klug (Autodesk) wrote in
    > > message news:3FB31B669244F2F21A4E688AFA8491F3@in.WebX.maYIadrTaRb...
    > > > It entirely depends on how the hyperlinks are authored into the DWF
    and
    > > what
    > > > your database app does with the hyperlinks when it receives them. I
    don't
    > > > think this is a function of the viewer, really.
    > > >
    > > > "Zach" wrote in message
    > > > news:664D71739D5CF14F586CCB2596C70127@in.WebX.maYIadrTaRb...
    > > > > We're doing some low end GIS work for clients and last night they
    asked
    > > if
    > > > > it's possible to click on a hyperlink attached to a valve (Lets call
    it
    > > > > V-100) and it pulls up a database that has info for the valves in
    the
    > > > entire
    > > > > system. Is there a way when the database is pulled up, it
    highlights
    > > the
    > > > > info for V-100 or is this not possible?
    > > > >
    > > > > Thanks
    > > > >
    > > > > --
    > > > > remove .ns to email
    > > > >
    > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    Please use plain text.
    *Autodesk\

    Re:

    04-02-2003 04:46 AM in reply to: *Zach
    You definitely need a programmer for this, as what you're talking about is
    not a trivial piece of work. It's not really a LOT of work, but it's
    certainly more than just a hyperlink. :smileyhappy:

    "Zach" wrote in message
    news:E66A31D9A7CBF377BAC084AE84842ACA@in.WebX.maYIadrTaRb...
    > Hey Peter.
    >
    > SO the only way to do this is with HTML code and not just with attaching a
    > URL to text and plot to the DWF? I'm not a programmer so it seems I'm
    > getting over my head already. The URL to the DWF file is
    > C:\mapping\filename.dwf, so would the URL to attach be
    > C:\mapping\filename.dwf?valve id=V-100 ? Probably not...
    >
    > --
    > remove .ns to email
    >
    >
    > Peter Lone wrote in message
    > news:E5303EC7C8A512D7EC68AC4026A70321@in.WebX.maYIadrTaRb...
    > > If you were doing it in ASP.NET, you could attach a hyperlink to the
    valve
    > that directed it to an ASPX page with some argument/value pairs. You
    could
    > then use the ASPX page to query your database and display the results.
    > >
    > > For example, say the valve in question is V-100. You could attach a URL
    > to the valve in the drawing like so:
    > > http://myserver/mydir/queryvalves.aspx?valve_id=V-100
    > >
    > > You would then publish the DWF to a web page. When the user picked on
    the
    > link, it would open up the QUERYVALVE.ASPX page. As part of the Page_Load
    > code behind, you could 1) Assign Request.QueryString("valve_id") to a
    > variable, 2) Setup the database connection, 3) Assemble and execute the
    > SQL to bring back the valve information in a dataset, and 4) Traverse the
    > dataset to display the resultant data onto the page using Response.Write.
    > >
    > > HTH,
    > >
    > > :smileytongue:
    > >
    > >
    > > "Zach" wrote in message
    > news:7DFB86F9E1E45EB355B084A89A3DDC0A@in.WebX.maYIadrTaRb...
    > > > How would you go about doing something like that then?
    > > >
    > > > --
    > > > remove .ns to email
    > > >
    > > >
    > > > Jeffrey Klug (Autodesk) wrote
    in
    > > > message news:3FB31B669244F2F21A4E688AFA8491F3@in.WebX.maYIadrTaRb...
    > > > > It entirely depends on how the hyperlinks are authored into the DWF
    > and
    > > > what
    > > > > your database app does with the hyperlinks when it receives them. I
    > don't
    > > > > think this is a function of the viewer, really.
    > > > >
    > > > > "Zach" wrote in message
    > > > > news:664D71739D5CF14F586CCB2596C70127@in.WebX.maYIadrTaRb...
    > > > > > We're doing some low end GIS work for clients and last night they
    > asked
    > > > if
    > > > > > it's possible to click on a hyperlink attached to a valve (Lets
    call
    > it
    > > > > > V-100) and it pulls up a database that has info for the valves in
    > the
    > > > > entire
    > > > > > system. Is there a way when the database is pulled up, it
    > highlights
    > > > the
    > > > > > info for V-100 or is this not possible?
    > > > > >
    > > > > > Thanks
    > > > > >
    > > > > > --
    > > > > > remove .ns to email
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    >
    >
    Please use plain text.
    Active Contributor
    Posts: 32
    Registered: ‎11-14-2003

    Re:

    04-02-2003 09:35 PM in reply to: *Zach
    I think that Zach and I are looking for the same thing. Only I have a VB form that already accesses the database. Anyone have any ideas on how to use a hyperlink to open a form in VB.
    Please use plain text.
    *Lone, Peter

    Re:

    04-03-2003 03:15 AM in reply to: *Zach
    You wouldn't necessarily need the name of your DWF
    in the URL string, unless for some reason you wanted that information to be
    passed to the ASPX page for use there.  The URL to be attached to the DWF
    would have to be constructed like so:

     


     

    To break this down...


    ... is the webserver where the ASPX page
    resides

    queryvalve.aspx

    ... is the actual ASPX page that will do all of the
    heavy lifting, like connecting to the database and writing out the data that is
    returned to a browser


    face="Courier New">?valve_id=V-100&myvar1=something
    ...
      

    ... is simply a few name/value pairs that you can
    pass along the URL string for use in the target ASPX page.  In this case,
    we're telling the ASPX page that it should have access to a parameter named
    "valve_id".  This parameter, when
    retrieved, will have a value of V-100
    Similarly, you could attach the same URL to any other valve on the drawing,
    changing only the value of the "valve_id" in the URL to identify the valve to
    query the database against uniquely.  So, for example, another valve on
    that DWF might have a URL of

    href="http://myserver/queryvalve.aspx?valve_id=V-143">
    size=2>http://myserver/queryvalve.aspx?valve...

    size=2> for valve number V-143.

     

    Once in the ASPX page, you could use
    face="Courier New">Request.QueryString("valve_id")
    to retrieve the value
    you passed into the ASPX via the clicked URL that was attached to the valve in
    the DWF.

     

    From there, you would use code to connect to a
    database and query back information on that valve, ie:

     

    Dim strSql
    As String

    strSql = _

    "SELECT valve_id, description,
    manufacturer, date_installed, useful_life " & _

    "FROM valves " & _

    "WHERE valve_id = '" &
    Request.QueryString("valve_id") & "'"

     

    If you have Visual Studio .NET in the office, I can
    help you get that set up.  As an alternative, I could help you do it in
    regular ASP.

     

    HTH,

     

    :smileytongue:

     

    > Hey
    Peter.
    >
    > SO the only way to do this is with HTML code and not
    just with attaching a
    > URL to text and plot to the DWF?  I'm not a
    programmer so it seems I'm
    > getting over my head already.  The URL
    to the DWF file is
    > C:\mapping\filename.dwf, so would the URL to attach
    be
    > C:\mapping\filename.dwf?valve id=V-100 ?  Probably
    not...
    >
    > --
    > remove .ns to email
    >
    >
    >
    Peter Lone <

    face=Arial size=2>plone@livingworkplace.com

    size=2>> wrote in message
    >

    href="news:E5303EC7C8A512D7EC68AC4026A70321@in.WebX.maYIadrTaRb">
    face=Arial
    size=2>news:E5303EC7C...

    face=Arial size=2>...
    > > If you were doing it in ASP.NET, you could
    attach a hyperlink to the valve
    > that directed it to an ASPX page with
    some argument/value pairs.  You could
    > then use the ASPX page to
    query your database and display the results.
    > >
    > > For
    example, say the valve in question is V-100.  You could attach a
    URL
    > to the valve in the drawing like so:
    > >

    href="http://myserver/mydir/queryvalves.aspx?valve_id=V-100">
    size=2>http://myserver/mydir/queryval...


    face=Arial size=2>> >
    > > You would then publish the DWF to a web
    page.  When the user picked on the
    > link, it would open up the
    QUERYVALVE.ASPX page.  As part of the Page_Load
    > code behind, you
    could 1) Assign Request.QueryString("valve_id") to a
    > variable, 
    2)  Setup the database connection, 3) Assemble and execute the
    > SQL
    to bring back the valve information in a dataset, and 4) Traverse the
    >
    dataset to display the resultant data onto the page using
    Response.Write.
    > >
    > > HTH,
    > >
    > >
    :smileytongue:
    > >
    > >
    > > "Zach" <

    href="mailto:kkacadman@yahoo.com.ns">
    size=2>kkacadman@yahoo.com.ns
    > wrote in
    message
    >

    href="news:7DFB86F9E1E45EB355B084A89A3DDC0A@in.WebX.maYIadrTaRb">
    face=Arial
    size=2>news:7DFB86F9E...

    face=Arial size=2>...
    > > > How would you go about doing something
    like that then?
    > > >
    > > > --
    > > > remove
    .ns to email
    > > >
    > > >
    > > > Jeffrey Klug
    (Autodesk) <jeffrey dot klug at autodesk dot com> wrote in
    > >
    > message

    href="news:3FB31B669244F2F21A4E688AFA8491F3@in.WebX.maYIadrTaRb">
    face=Arial
    size=2>news:3FB31B669...

    face=Arial size=2>...
    > > > > It entirely depends on how the
    hyperlinks are authored into the DWF
    > and
    > > > what
    >
    > > > your database app does with the hyperlinks when it receives
    them.  I
    > don't
    > > > > think this is a function of
    the viewer, really.
    > > > >
    > > > > "Zach"
    <

    size=2>kkacadman@yahoo.com.ns
    > wrote in
    message
    > > > >

    href="news:664D71739D5CF14F586CCB2596C70127@in.WebX.maYIadrTaRb">
    face=Arial
    size=2>news:664D71739...

    face=Arial size=2>...
    > > > > > We're doing some low end GIS
    work for clients and last night they
    > asked
    > > > if
    >
    > > > > it's possible to click on a hyperlink attached to a valve
    (Lets call
    > it
    > > > > > V-100) and it pulls up a
    database that has info for the valves in
    > the
    > > > >
    entire
    > > > > > system.  Is there a way when the
    database is pulled up, it
    > highlights
    > > > the
    > >
    > > > info for V-100 or is this not possible?
    > > > >
    >
    > > > > > Thanks
    > > > > >
    > >
    > > > --
    > > > > > remove .ns to email
    > >
    > > >
    > > > > >
    > > > > >
    >
    > > > >
    > > > >
    > > > >
    > >
    >
    > > >
    > >
    >
    >
    Please use plain text.
    *Lone, Peter

    Re:

    04-03-2003 03:28 AM in reply to: *Zach
    VB forms are a little bit more tricky.  I
    assume you're using VB6?  See, web pages, for the most part, don't have the
    same security considerations as do standalone EXE or DLL VB forms.  You
    could theoretically call the EXE directly from your URL, ie:

     


     

    This should launch your app, provided that it is
    installed from an accessible location for anyone who might want to access
    it.  Usually, this is local to the user, making deployment a
    pain.  But inherent Windows security comes heavy into play
    here,  Examples: 1)  The browser security settings for each user
    must be set to accept this behavior, and 2) Users will almost certainly have to
    contend with that "Save or Open" download prompt dialog each time a link to your
    form is selected.  Of course, your VB app would have to be configured to
    accept the passed in myvar command parameter as
    well.

     

    Something you could try is to compile your form as
    an OCX.  Without too terribly much effort, you could embed your OCX
    in a web page using an object tag, not much unlike what AEV does.  The
    problem here is that without a digital certificate, or altering each client
    browser to extend full trust to your deployment site (unlikely going
    to get past IT), the user would still get prompted each time.

     

    I would take a hard look at migrating your form to
    a web-based form.  There are many deployment benefits, and with DHTML
    behaviors or Visual Studio .NET, many of the features that you are currently
    doing in your VB form can be replicated in an ASPX page.

     

    HTH,

     

    :smileytongue:


    style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
    I
    think that Zach and I are looking for the same thing. Only I have a VB form
    that already accesses the database. Anyone have any ideas on how to use a
    hyperlink to open a form in VB.
    Please use plain text.
    *Anderson, Kenneth

    Re:

    04-04-2003 05:56 AM in reply to: *Zach
    another tip would be to add the ?target parameter to your URL toopen a
    new window with the record data in it (if AEV does support that ?target
    parameter like WHIP! did, I would assume that it would, although I have
    not tested it yet with AEV, I still use the old WHIP! for netscape
    compatibility).

    add to:
    <<>>
    to become:
    http://myserver/mydir/queryvalves.aspx?valve_id=V-100?target=_blank

       That is the way that I do it, that way, you do not loose the current
    view of the dwf (and have to find that entity again in the .dwf) as it
    get replaced with your data record in the current window. I use
    ColdFusion instead of .asp though, and MSACCESS for the database...

    It works GREAT! The data record from the entity even serves up the
    project number that the item was intalled under. From that project
    number I have a link to my document management system, the document
    mgt. sys. has links to scanned .tiff files in acrobat format and .dwf
    files if autoCAD files are available, bringing us full circle to the
    installation record drawing. I have several applications that do this
    type of thing. All using AutoCAD, MS Access, Adobe Acrobat, and ColdFusion.

    ColdFusion is SO easy use. The only problem is that you need to have a
    server hosting it and the database. With a few lines of code, you can
    accomplish SO much, and it is pretty much ROCK SOLID for stability!

    I wrote a custom LISP routine to attach the attribute values of the
    blocks to the entity. It gets the attibute value(s), puts them into a
    string, along with the url, then attaches the url value to the entity.
    Assigning thousands of links at the drop of a hat, all automated! I
    wrote some script files to automate the loading of the .dwgs attaching
    of urls and writing of .dwf files! When I update the .dwg file (and
    database) with new info, just run the script file and all is done!

    K.
    Please use plain text.