Direct Shape Import material quirk, Material Color is invalid via API until material is edited via UI - revit-api

- Testing in Revit 2017
- Dynamo Python node (/ revit lookup / any API call)
Description
I would like to query a material's Color Property. This material is an automatically generated material from a Rhino 3dm(DirectShape Import). The Color property should be the layer color and this holds true when looking in the material browser and how its rendered. However, querying it via the Revit API results in an invalid color property.
The color parameter stored in a material from a direct shape is not properly initialized/errors out until you actively use the ui material browser and modify the material. Until then, using the API (u can test this with revit lookup) to get the material color return an invalid color, making retrieving the rgb value not possible
However edit the material via the Ui, such as editing the surface pattern or color...This somehow refreshes the color parameter and allows one to use the revit API to read the color parameter afterward.
Things I've tried thus far
+ Updating another property (such as surface pattern / color) via the API, doesn't do the same as when updating via the UI material browser
+ Doc.Regenerate() after updating the property. (No changes)
+ tried getting built in parameter'doc.GetElement(ElementId(28736714)).Parameter[BuiltInParameter.MATERIAL_PARAM_COLOR].AsValueString()' returns blank.
+ tried saving document after updating misc. property via api, doesn't change anything.
Ideas
+ reading the solids and faces , somehow translating them to brep geometry and recreating the direct shape. in this way one can assign the material IDs to each face. however, geometry faces as far as i know cannot be converted into brep builder faces.
Visual Explanation
Visual PDF explanation of the problem can be seen here: https://www.docdroid.net/n2j9Auy/170628-color-direct-shape-material-quirk.pdf.html

You might want to ask this same question in the official Dynamo forum as well, since that is monitored actively by the Autodesk Dynamo guys, who are in closer contact with the Revit development team:
https://forum.dynamobim.com/

Related

ArangoDb Web Graph visualization - Select node attributes

I'm using ArangoDb Graph web interface.
I have created a graph with nodes from different collections.
As each node collection has its own attribute set, is there any way to choose different labels to be shown?
there currently is no way to select the label attribute per vertex collection.
You may want to open a feature request via github, or take a look at https://github.com/arangodb/arangodb/blob/devel/js/apps/system/_admin/aardvark/APP/frontend/js/views/graphViewer.js#L693 - However, the used Sigma.js library has to support it in first place.
I was having the same problem before. But, after setting the start node, the labels appear correctly.
Otherwise, the arrows, as you can see in the picture, do not appear. I set documents and edges. I tried changing colors, types, label, and nothing.
The worst problem is that I can save the properties one thousand times and, if I close the graph open it again, it loses the changes. I tried to find a Python code to set the label, but nothing till now.
Maybe the number of edges (1,435,022)?

Can't create graph from node/edge collections in ArangoDB 2.2.0

Last week was released ArangoDB 2.2.0 with many nice changes. I want to refactor some AQL graph queries since the API has changed from 2.x to 2.2.x and many methods are now deprecated. The issue is that I can't create a graph from my node/edge collections from the UI, I'm getting the following error:
Sorry your graph seems to be empty
Having a look at the logs there is no error.
Any clues?
EDIT:
I include the UI behaviour I commented:
By default, from/to collections do not show up:
When clicking the add button or near to it, from/to collections fields show up. It's not clear to me I should do it to be able to set up the edge definition.
I just found out the issue, a UI related one. When specifying the edge definitions, only "Edge defintions" field is displayed but not "fromCollections" and "toCollections" fields. I was a bit confused about it as well, since in the docs I noticed these concepts (in 2.1.2 only edges collection name was necessary). By clicking in the add button (or around it), these fields show up and everything works as expected when filling them in.
The graph viewer expects a graph to contain at least one vertex.
This message indicates, that your graph does not contain any data. Please make sure that your vertex collections contain at least one document.
I am bit confused by your description.
In all versions below 2.2 we offered a dialog to configure your graph viewer before actually showing it (there you could select a vertex and an edge collection). Are you using a bookmarked version of this page?
It will not work any more.
If this is the case, please use the normal graphs tab from the menu and create a new graph where you reference the collections you already have.
If this is not the case the answer above is correct.

is it possible to use smart image in multi-composite field?

I tried using smart image in multi composite field. In that the images are getting persisted, the remaining fields in the multi composite fields are not getting persisted. when i edited the dialog for the first time the values are getting stored on the node. when i edit the dialog next time it is showing me empty fields for the fields other than smart image.
This won't work. SmartImage and SmartFile have some restrictions to them. And there are two different versions: SmartImage and SmartFile vs. Html5SmartImage and Html5SmartFile. Depending on your actual Version of CQ it is even only possible to have the smartimage as a separate tab without any other fields. On top of that the behaviour for the different browser and versions together with the configuration of your SmartImage have different outcomes in JCR. This is even true for AEM 5.6.1 and the Html5 versions of the the xtype.
I can't post the full solution (as the code is not mine) but give some pointers how you could achieve your requirement:
Write your own Widget that replaces the multifield xtype. The author called it genericmultifield and what it does is to open an additional configurable dialog for each item. In this dialog you have the full controll again. It stores each item as a separate node below your resource from where you open your main dialog.
Though you need good ExtJs knowledge to achieve this and considering AEM 6, with a complete new Touch UI I am not sure if it is wise to do so. I didn't have time to check out AEM6, but maybe they already have something like this in their new UI.

Managing large envelopes

Background: We use the DocuSign SOAP API method CreateEnvelopeFromTemplatesAndForms for a very clear reason (mainly, we don't want to keep track of page numbers and X/Y coordinates) and we do not want to stop using this api method (unless there is another method that doesn't force us to keep track of page numbers and X/Y coordinates). I mention this before someone happily suggests I use another method.
Problem: We've recently been asked to send large envelopes through the DocuSign api (could exceed 100 mb). I know that DocuSign doesn't place a limit on envelope size, but rather on size of payload per api call when the envelope is created. I think what we need to do is the following, but I am having trouble:
Step 1: load up to 50 mb in the templates
Step 2: call CreateEnvelopeFromTemplatesAndForms but set the ActivateEnvelope parameter to False
Step 3: load up to another 50 mb in the a new set of templates
Step 4: call CreateEnvelopeFromTemplatesAndForms again but this time set the ActivateEnvelope parameter to True.
Is what I'm trying to do possible? I keep getting an error that says the "TransactionID has already been used." If what I'm trying to do (in general) is possible, any code samples would be much appreciated.
I believe Anchor Tags is a viable and easy to use feature that should solve your issue here. With anchor tags you can still use the CreateEnvelopeFromTemplateAndForms() API call but you won't have to specify page numbers or (x,y) coordinates for your DocuSign Stick-eTabs. Instead, those tabs will get "anchored" to your documents based on content that it finds in the document itself.
For instance, let's say you have a document that needs to be signed and in the document where the signature should go you have the text "Sign Here". You can have the system place a signature tab close to this "Sign Here" text. You could have it place it X amount of pixels to the right, or Y inches or cms to the right, etc.
You can add these tabs at the account level, which means they will get applied whenever their corresponding text is found in ANY envelope you create in your account, OR you could add them in your API request so that they are only used on that particular envelope.
For more info please see the following links:
Previous Stack Overflow Question
Explanation on Dev Center - look at Tab Positioning section

ExtJs - Allowing user to modify position of form fields using drag and drop

We have been developing our application using ExtJs 4.0.7, and now we have a new feature request which will allow user to set the position of form fields, as per his choice, using drag and drop.
For example, if currently a form has fields arranged in rows, then the user can pick these fields and arrange them in columns, or he can move a field from first row to second etc..
The user is also allowed to save this layout and when he opens the screen again then he gets to see the fields arranged in the same manner he saved.
I have not been able to locate any example in ExtJS carrying such a functionality, so I was wondering if this is possible in ExtJS?
Also, as the user is allowed to save the layout, thus, will this involve storing of ExtJs code in database or dynamic generation of ExtJS code from server side.
Looking forward to guidance at this.
Thanks in advance.
The only example of such a beast I have seen is the Sencha Designer. It saved the complete JSON object that represents the form config ... I suppose it's doable, but good luck :)

Resources