Create custom shape or connector in PowerPoint using code/script/definition - powerpoint

The shapes in in PowerPoint 2007 seem to be built in - is there a way to create 'user'/'custom' shapes?
I wanted to create a custom connector, but knowing if you can create a custom shape, could be handy in the future.

There are several ways to do this, but not sure if they would meet your needs. If you need to have a custom shape added to the "insert shapes" drop-down and then place and size with your mouse cursor, then I know of no way to do this.
However, if you would like to define a custom shape and then programmatically add this to a location in your presentation, this is doable for sure. In VBA and VSTO, this is can be done via the Object Model; you can add a FreeForm shape, polylines, curves, etc. and in some cases group these to form a single shape. I've done as much with a series of 9-pointed stars that I needed on a regular basis.
To create a custom shape/connector in Drawing ML also appears possible. It is not something I've tried yet, but it certainly looks as if it can be done. There are a number of calculations you would need for this that are well documented in the Ecma specs. By "well documented", I don't mean "easy" though - all of the formulas can be complex. In the case of the connector, it looks as if you would need to programmatically change the shapes your connector is connecting to though to your custom connector (shapes identify their connector, if they have one).

Related

Highlight buildings in a map

I have a requirement where I need to highlight the buildings around my current location on a map. I am using Xamarin and was wondering if anyone can point me to a correct library or control that can fulfill my requirement.
I am currently using Mapsui for Xamarin but I don't think it has the feature I am looking for.
If you have access to the geometries of the buildings there are many ways you could implement highlighting.
One way that comes to mind. Create a layer on top of your background layer with the same geometries as data source. Use a ThemeStyle to show only the selected geometry. The ThemeStyle class is created with a callback method which determines the style. In that method you should return no style unless the feature id is the same as selected feature id.
You can take a look at the ThemeStyle sample for a more general use of themes (no highlighting).
Also you could look at Mapsui.Sample.Wpf.Editing. Here is a screenshot of that sample:

How to annotate the area of a polyline in autocad command / macro

Does anyone know of macro or custom command I can make to quickly annotate the area of a polyline in autocad?
I'm doing a project where I need to measure the lot and house size of several city blocks. I've got a drawing going but I don't want to measure and write out the area of each site, that will take to long. I've seen custom commands in the past that quickly do this kind of thing but I don't know how to make my own.
And I'm desperately avoiding doing it by hand one at a time as most likely I will need to make adjustments to my design later on.
The best method I can think of is to utilize the MTEXT command and use a FIELD to link the Area of the Polyline to the MTEXT box.
Type FIELD at the command line, choose Object, select your Polyline and you will see the Area property.
Here is a link on the CADTutor site that covers it a bit more in depth along with a link to a forum post that has this automated via a Lisp routine.
http://www.cadtutor.net/forum/archive/index.php/t-46628.html

Is it possible to programatically create labels in AutoCad?

Our engineering department wastes a great amount of time reviewing drawings for errors. The majority of these problems involve human errors in labeling (ie. two rooms have the name 01-01-00-RM). Our IT department has come up with a partial solution by automation the room names. However, the engineers still have to type this into AutoCAD.
Is there any way to create labels in AutoCAD based on another file (ie. an Excel/CSV document)? Ideally, one would create a group in a layer and enforce that all elements be unique, then have them retrieve their values from a document.
EDIT
Some screenshots of the labels. Note, for company reasons, I can't put full PDF screenshots up.
First image showing compact label next to a camera. This was on a floor plan overlay.
Second image showing the full lable next to a camera. This was in the block diagram
Yes it's possible, there some different paths:
Lisp: very common on AutoCAD environment and allow some basic (and not so basic) automations.
VBA/COM: can be used from inside AutoCAD or by external process, just need to CreateObject("Application.AutoCAD") and program the steps
.NET or C++: in-process automation that allow powerful customization, up to a major remodeling of AutoCAD.
So, depending on your expertise, you may choose different approaches. It may also combine with batch processing via AutoCAD Console.
Find more at http://www.autodesk.com/developautocad and at the blog http://adndevblog.typepad.com/autocad
If the labels were blocks with attributes then you could use the ATTOUT and ATTIN commands in Express tools to export / import them in to/out of Excel. Watch for cell formatting in Excel - eg. numbers like 1/2 turn into dates if you leave the formatting as "General".
Programmatically this is reasonably trivial if the data is structured. An AutoCAD drawing is actually a hierarchical object database so everything in it is addressable, finding it is often the hardest part. If you have an AutoCAD installation handy, have a look into a drawing with MGDDBG to get an idea of the database structure.

Set a country background to my Google Geomap

A few days ago I've explored geomaps and, however, it turned out to be easy to change the properties of the elements.
But I have two questions:
I'd like to add rivers and forests on the maps. So Ive considered to set a background image instead of the geomaps figure. But I can't find a way to get this one fixed. Is there a way to set a background picture for a country or region?
How can I change the shape of the "bubbles" when you select a city e.g. "London"? I'd like to change it to a square.
Thanks in advance for your help!
Unfortunately what you're looking for is not available in geocharts in their current implementation.
Using a background image is possible in the sense that you can use CSS to make all shapes in the map transparent, and use a background image in the div to make it appear as if the little circles are being drawn on a map with forest and rivers, but you will run in to two big hurdles:
Your map will need to be identical in size/layout to the Google Maps SVG
If Google ever changes the SVG they use (or the view/projection they use) you will need to edit yours too
This isn't ideal, obviously. You could work around it by creating custom javascript to write rivers and forests on your map, but that is going to be a huge headache (especially if you are using multiple maps/views).
As for the circles, you can't change them to squares without hacking the actual SVG in the background with javascript. While this is definitely possible (if you're really good with SVG/Javascript), it again isn't using any of the fancy features of geocharts, and is more just a custom solution that will have to be updated if/when google updates their API.
Rather than doing it that way, you may want to look in to the same implementation on google maps itself. That will allow you to use custom markers, draw custom shapes, etc. with a lot more flexibility (and a much more stable API).

Is there a solution for PowerPoint map animation

I want to realize a function in PowerPoint map animation. The animation can be realized by any technologies. But it must accept the data, either from excel or from other sources and the map changes when changing the data.
Do you have any ideas?
It is relatively straightforward to embed Flash or Shockwave objects in PowerPoint. Find out more. There is a similar process for embedding Excel graphs: check it out.
Of course, these kinds of whizzy effects rely on using the later versions of the Office product set.
edit
The slide deck on that site doesn't feature data-driven animation. It is a set of static pages which use PowerPoint custom transistions to animate the map.
I think that is not what you are seeking. You need something which builds an animated map from some data source. That is not a PowerPoint or indeed an Excel feature. You need a specialized tool. Such things exist - for instance MapCreator - but I haven't used any of them and I can't recommend one.
Once you have your animated map object it is probably a cinch to import it into PowerPoint or whatever else you want to do.

Resources