Clickable link in model space to an Object within the same space

Clickable link in model space to an Object within the same space

Anonymous
Not applicable
2,527 Views
9 Replies
Message 1 of 10

Clickable link in model space to an Object within the same space

Anonymous
Not applicable

Hey all,

Fairly new to ACAD, just have an Essentials class under my belt. Not sure if this is too advanced, but figured I'd ask.

I have a Data Center drawing that contains many cabinets, cages and racks that either belong to customers, are available or owned by the DC itself.

What I'm aiming for within the Model space is to create a table with cage/cab/rack Id that are clickable. Once it's ID is clicked, the view will automatically zoom to the cage/cab/rack chosen. Is this even possible? There are DCs with hundreds of customers on a drawing and this would simplify it. Ideally, and down the road, the table would also automatically show the sq ft of each cab/cage/rack (even if space is modified, the sqft would change on its own). 

I've played with the hyperlink and other options, but again, fairly new at this so looking for assistance.

 

Thanks in advance!

Rob

 

0 Likes
Accepted solutions (1)
2,528 Views
9 Replies
Replies (9)
Message 2 of 10

Alfred.NESWADBA
Consultant
Consultant
Accepted solution

Hi,

 

you can define named views in AutoCAD (command _VIEW).

For your list of objects you can attach a link that points to the corresponding view, so using then <CTRL><CLICK> on the object with "1/2/3" will zoom you to the view you assigned to it and that could then be cab 1/cage 2/rack 3

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 3 of 10

ChicagoLooper
Mentor
Mentor

Without question, use GIS or BIM. Doing this is vanilla Cad is inefficient. If the mayor of your city were to get rid of all sanitation trucks and use wheelbarrows instead, he would be honored for reducing emissions and balancing the budget due to massive cost savings but I doubt if he’ll be reelected. 

Chicagolooper

EESignature

Message 4 of 10

pendean
Community Legend
Community Legend
🙂
0 Likes
Message 5 of 10

Anonymous
Not applicable

Thanks Alfred. Still not getting it. I'm looking at it as assigning, for instance, a cabinet a link, like a URL. Then in the table list, I'd like to make the cabinet ID that points to that specific cabinet/link and will zoom in on it once clicked. Perhaps I'm looking at it incorrectly or just simply not understanding the process and am too new at it.

0 Likes
Message 6 of 10

pendean
Community Legend
Community Legend
Hyperlink in AutoCAD only work with VIEW command predefined views (and external files/links of course). Not much else. Nada. Zip.

So... to click on a link that takes you to a specific cabinet, you have to first start VIEW command and set a new view at that cabinet (with a unique name).

HTH

0 Likes
Message 7 of 10

imadHabash
Mentor
Mentor

>> I've played with the hyperlink and other options,

as i understand your issue ... Hyperlink is the right command. just do the follow :

  • first you have to prepare your View where you want the clickable link go to , type VIEW >> New (save it with name) .
  • Now from Hyperlink command , at left panel click View of This Drawing.
  • from the right panel expand Model icon to find there the name of your previous selected view . 
  • To use the hyperlink, hover over the hyperlinked object until you see the hyperlink cursor. Then press Ctrl + click to directly go for your view.

 

Imad Habash

EESignature

0 Likes
Message 8 of 10

ChicagoLooper
Mentor
Mentor

I believe what you want is a way to link a geometric object with data.

 

Click on an object, a geometric shape representing a cage, cab or rack, then a row within a table is highlighted, where the row contains information such as square footage occupied. You also want the capability to go in the opposite direction, click on a row in the table and the geometric object is highlighted in modelspace, where modelspace is a  'map' of the Data Center. The ability to link data, more specifically attribute data, with a geometric entity, more specifically an entity geospatially referenced against the real world, is the core of GIS.   

 

Object-to-Data OR Data-to-Object.Object-to-Data OR Data-to-Object.

 

 

Each Row represents a record or a geometric entity--each individual cage, cab or rack would have its own row. Each Column represents a piece of data, e.g. ID number, square feet occupied, owner, date installed, last service date, date to be replaced, etc., etc., etc.

 

Once your data is established you can maintain it. This involves knowhow and labor hours, but keep in mind, whoever 'maintains it' is in control. (You want to control the data, not let the data control you.)

 

The Data Table is powerful and should never be ignored. You can run queries which will allow you to perform analyses. Examples:

  1. You create a list based on square footage each object occupies. You compare the list with lease agreements of your customers to find out if you are overcharging or undercharging rent, since rent is based on square footage. You can even take it further by finding out whether certain 'areas' within the data center commands a higher price--the high rent neighborhood.
  2. You create a list based on the date equipment is to be replaced. You can plan major hardware replacement and avoid untimely shutdowns which may cost you and your clients money.
  3. You create a list that collects the locations of equipment that require service calls. You may isolate the area(s) and look at  room temperature to see whether it is air flow related.
  4. You look at trends and upticks. You make predictions. You make plans for the cages, cabs and racks. You make plans for your plans.

Data is golden. While your effort is admirable, you can't replicate this in vanilla Cad. You need more horsepower. Using a hyperlink is like using a wheelbarrow when you really need a dump truck. Sure, you can move dirt using a wheelbarrow, but is it efficient? Will your clients notice a difference in efficiency? Will a colleague down the hall from you, or a competitor, create a comparable drawing using more eloquent commands and be able to achieve the same or better results?

Chicagolooper

EESignature

0 Likes
Message 9 of 10

Anonymous
Not applicable

That seems to have worked, I can do with it. Though I needed to explode the table for it to work. With the table now exploded, it no longer calculates the SQ footage of a given space. Unless I can possibly explode just the first row of the table that has the IDs and the rest remains intact somehow. Will play with it. 

And ideally, I was looking to just click on the ID and not have to press CTRL click, but it'll do.

Thank you all for your input!

0 Likes
Message 10 of 10

tdoYBRN7
Explorer
Explorer

How can I create hyperlink (View of This Drawings) for View (View Manger ) ?

 

[CommandMethod("createHLink")]

static public void CmdCreateHyperLink()

{

  Editor ed = Application.DocumentManager.

    MdiActiveDocument.Editor;

  Database db = Application.DocumentManager.

    MdiActiveDocument.Database;

  PromptEntityResult selectedEntity =

    ed.GetEntity("Please Select an Entity: ");

  ObjectId objectId = selectedEntity.ObjectId;

  try

  {

    using (Transaction trans =

      db.TransactionManager.StartTransaction())

    {

      //Get the entity

      Entity ent = trans.GetObject(objectId,

        OpenMode.ForWrite) as Entity;

 

      //Get the hyperlink collection from the entity

      HyperLinkCollection linkCollection = ent.Hyperlinks;

 

      //Create a new hyperlink

      HyperLink hyperLink = new HyperLink();

      hyperLink.Description = "ADN DevBlog";

      hyperLink.Name = "ADN DevBlog";

      hyperLink.SubLocation =

        "http://adndevblog.typepad.com/autocad/";

 

      //Add the hyperlink to the collection

      linkCollection.Add(hyperLink);

      trans.Commit();

    }

  }

  catch (System.Exception ex)

  {

    ed.WriteMessage(ex.Message);

  }

}

0 Likes