Tuesday, September 27, 2016

Rendering AutoCAD drawings in Alfresco


One question we are often asked is how to render AutoCAD drawings in Alfresco so that they show up as thumbnails and in the preview window.  

The easy answer is to license Formtek’s Engineering Data Management Module for Alfresco (the EDM Module).    When discussing rendering a drawing in Alfresco, several questions arise.  Among them: 
  • Do you want to view just the base drawing or the complete drawing with its external references?
  • Can you see all views of the drawing?
  • Is there adequate capability to zoom and pan the drawing rendition?

With EDM Module release 3.0 (designed for Alfresco 5.1 and above), you can indeed view just the base drawing or the base drawing with its XRefs. 

Rendition of a Base Drawing with XRefs

By default, the EDM Module will render the model space and all layout views in a multi-page PDF. All renditions are in vector format, allowing the scroll and zoom features of the Alfresco viewer to be exercised with complete fidelity. Note that the Alfresco viewer has a zoom limitation of 400%.  If you download the multi-page PDF rendition, you will be able to take advantage of the zoom, scroll and pan features of your reader.  (For instance, the Adobe Reader allows zooming up to 6400%.)

The EDM Module also comes with a built in content model, which includes both an Engineering Drawing and Engineering Document content type.  And, of course includes view, edit and search forms.  

 

Default Edit Form:  Engineering Drawing Content Type


It is a fairly easy exercise to map the block attributes from a drawing into the content properties in the Engineering Drawing type.  You can also create your own custom content model and map the block attributes to the properties in that model.


Here’s a video with more information about the basic functionality of the EDM Module:





Formtek EDM Module for Alfresco
 
And here’s one which provides more information about managing XRefs in the EDM Module:

 

Managing Drawings with External References

If you are interested in direct synchronization with AutoCAD, Formtek also offers a plug-in to AutoCAD which integrates AutoCAD and Alfresco, but that will be the subject of another blog post.

One final note:  the EDM Module for Alfresco only works with Alfresco Enterprise One (i.e. not with the Community version of Alfresco).
 

Wednesday, September 21, 2016

Create and Add Filter Properties to Alfresco Faceted/Filtered Search

Alfresco added new search capabilities in version 5.0.  Integration with the Solr 4 search engine brought with it the ability to do faceted searches.  Later, in Alfresco 5.1, Alfresco also introduced a tool for visually creating an Alfresco content model.

In this blog post we will use new visual Alfresco modeling tools to configure faceted search: Model Manager and Search Manager.  We will use Model Manager to create an aspect with two properties.  Then we will use Search Manager to create filters based on those new properties that we can add to Alfresco faceted search.  No coding is needed and the task can be done in about 30 minutes to an hour.

Let's look first at the Model Manager in the Share.  You can find this in the Share Administration console.  We'll create a new model and assign a unique namespace and name.  This example has to do with faceted search, so we will call it facetedmodel and assign a prefix for the model definitions to be fsrch.


Within the newly defined model, we then can create a new aspect.  We will call it fsrch:testSearch.  When defining the aspect name in the form, the model namespace prefix is not used.


Note that in 5.1 I noticed some page refresh problems with the Model Manager.  When creating the aspect and property values I needed to occasionally force a page refresh of the browser by using Ctrl-F5.

We'll create two properties that as part of the new aspect: department and number.  Department is a text field that will be constrained to be one value from among a list of possible values.  For the indexing specification, we assign List of Values -- Whole Match.  Selecting this will allow us to use this property later for faceted search.




The second property that we create is called fsrch:number which is an integer.  By selecting the "Enhanced Search" indexing option, we will later be able to include this property for faceted search.


Now that our model with a single aspect that has two properties has been defined, we can activate it so that it will be usable within our Alfresco instance.  In the next screenshot we can see the Activate option on the pulldown.


After doing that, we then see the green indicator on the row in the Model Manager for the model that shows that it is active.


We can also specify how the properties of the aspect will appear on edit and view forms in Alfresco.
To do that, we go back to the top of the Model Manager and look at the definition page for the model.  There we can see the types and aspects that make up the model.  In the Actions pulldown next on the row for our aspect, select "Layout Designer"

Doing that will bring up a visual editing tool that can let you easily design how content model properties will be displayed within edit and view pages of Alfresco.

In this case we lay out the two new properties to be displayed as a single new row for a form.  The selected area is a two column layout.  When the new aspect is applied to a standard content type item, the edit form for the item will display this row of our properties on the form.

Within the layout tool, we can specify labels that will appear next to each of the properties.


To test what we've done so far, we can find a content item that we've already uploaded and go into the details page for that item.  Here is a PDF file that was uploaded as standard content (cm:content).  On the details page, select Manage Aspects.  In the list of available assignable aspects, the new aspect is included.  Select that and add it to an assigned aspect for this content item.


When we look at the item where we assigned the aspect and select the "Edit Properties" action, we can see the new properties on the bottom of form.


And when looking on the bottom right of the item's details page, we can see the view form.  At the very bottom of the form are the two new properties that we just defined.
That's great.  Now we can create some items, assign the new aspect, and edit the new properties.  To speed up the task of assigning the aspect, it might be a good idea to create a rule on a folder that will automatically assign the new aspect as content is uploaded, although we won't show that here.

Now lets see how we can create faceted search filters on the search results page.  The search results page has a new option along the upper right side of the page called Search Manager.

On the Search Manager page we can define new filters for faceted search.  Click on Create New Filter.


Fill in the new filter dialog the information for the new department property.


Then, similarly, fill in information about the new property called number. 


Save both of these new filters.  Then on the Manage Search page notice that on the left there are arrows that allow you to position where the filter will appear in the faceted search panel.  We can position the new filters to appear prominently on top.


Now, execute a query and go to the search results page.  You will see something like the following.


The two new filters show on the left.  The current results are filtered by the Department called Engineering.

If you want to learn more about the Model Manager and the Search Manager, see these pages in the online Alfresco documentation: