Help creating a Floor Plan room ID shape

Started by ThirdDimension, August 09, 2015, 07:12:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ThirdDimension

I would like suggestions / recommendations on setting up a floor plan room ID shape.

The "ID" shape just needs to be a simple oval shaped with a number label inside.  For example, a small oval sahpe with text "101" inside. 
The shape will be placed in the Stencil Library for future use. 

So far so good. 

Now, I would like to add the following attributes to the shape:
1) When I pull the "ID" shape from the Stencil Library, the shape is automically given the number label (with a user defined starting point such as "101")
2) AND as each new "ID" shape is pulled from the stencil library, the shape is automatically labeled with the next available number
3) AND (very important) NO number duplication is allowed.

In the end, I would like to be able to drag and drop the "ID" shape inside each room and ASSURE that I never have two rooms labeled with same ID

One solution is to use the shape properties window and create a SHAPE ID lable, but I don't know how to add shape data to text in order to paint the oval around the text

Any help is always appreciated!!!!!!!!

Thanks

3rd D   



Yacine

Hi 3rdD,
Autonumbering of shapes has been discussed several times in the forum, but never really brought to an optimum end. The matter is complexe, as you need to consider deleted shapes as well.
As for displaying a custom property in a circle, you may want to watch these videos:
https://www.youtube.com/watch?v=Wqh9voTlOso
https://www.youtube.com/watch?v=Xbfwqo9QmEA

Cheers
Yacine

ThirdDimension

Thanks for guidance Yacine.  I will check the videos out. 

Also, I might need a little guidance on working the search engine on this site.  I can never seem to find things discussed in the past




ThirdDimension

adding the "CALL OUT" shape as in the video worked.

However, I would like to work a little more with the properties.  Is there any way to impose restrictions on a value in a a fixed list (within properties)?

For example, in the properties of the shape I can build a drop down menu and pull the room number from that drop down menu.  Once pulled, that number is no longer an option.

Would something like this be possible?

3rd D

Yacine

1) on google try: "autonumber site:visguy.com" The results may be better.
2) a list from which numbers disappear? This would be something new for me. Please explain.
Yacine

ThirdDimension

Yacine,

I didn't do a good job explaining. 

What I was trying to explain was a situation where you could use a drop down menu to make a selection, then once selected, you would be unable to make that selection again.

I will try to give a hypethetical example.  So let's say the numbers represented seats in a stadium, and you want to assign a seat to each person.  You could only make one assignment for each seat and then that seat would no longer be available (grayed out).

wapperdude

Rather than make a list that you pull from, it might be easier to just record what's used.  For starters, I think there's something like a legend shape which shows how many shapes of ca particular type have been placed on a page.  I believe this may be configurable.  Next, you could run a report and get a list...definitely configurable, but doesn't dynamically update...you have to run the report. Combine those with auto-numbering and I think you are mostly there.

You can customize the report to show location of each shape.

Just a thought.

Wapperdude

Visio 2019 Pro

Hey Ken

Third:

   I might have just what you need, and it doesn't need any VBA.  Here's the deal:

1.  On the document shapesheet, create User.NextNumber and set the value to one less than your starting number, such as zero.
2.  On your callout's shapesheet, create User.Text.  You can leave the value blank initially.
3.  On the callout shape, click on Insert/Field, and under Category choose User-Defined Cells, and under Field Name choose Text.
4.  On the callout's shapesheet, in the EventDrop event cell, enter "=SETF(GetRef(User.Text),TheDoc!User.NextNumber)&SETF(GetRef(TheDoc!User.NextNumber),TheDoc!User.NextNumber+1)" (without the quotes).
5.  On the callout's shapesheet, set LockTextEdit to 1 to prevent anyone from changing the value.
6.  Drag the shape onto your stencil.

   That's it.  Every time you drop the shape onto a page, it automatically gives you the next highest number, and it stays unique across pages, but not across documents.

   I put together a sample callout on the attached stencil.  It's slightly more complicated than the above steps because the oval callout is a grouped shape.  So the EventDrop and User.Text cells are on the grouped shape, and the sub shape has the inserted field, the LockTextEdit, and its own User.Text whose value references the group's User.Text.  Simpler than it sounds, it just spreads the solution across two shapes.

   FYI, there's no need for your users to create the User.NextNumber on their drawings.  Visio creates it automatically the first time you drop the callout, and you can always change its value if you need a different starting number.

   You still have the problem with deletions that Wapperdude mentioned—delete a callout and that number is gone forever.  It would take a little diddling to set a callout's number manually, such as setting LockTextEdit to 0, changing the value, then setting LockTextEdit back to 1.  Might want to add a right click action to make that easier, but you're on your own there.

   Hope this helps,

   - Ken


   
Ken V. Krawchuk
Author
No Dogs on Mars - A Starship Story
http://astarshipstory.com