I would like to Dimension the family instances. What is the reference I should be provided while creating dimension.
I have tried with several approaches but the dimensions are not getting deleted when I delete the family instances. This means that, the dimensions are not getting attached to the family instances.
Please help.
Have you found a way to address this manually through the user interface? That is mostly the best place to start when tackling a Revit API task. If you can solve it through the UI, the chances are good it can also be automated. If no UI solution is found, automation is mostly impossible as well.
I would analyse the exact differences caused in the Revit database on the elements involved and their parameters by executing the manual modification. Once you have discovered exactly what is changed by the manual UI interaction, you can probably replicate the same changes programmatically through the API. Here is a more exhaustive description of how to address a Revit API programming task:
http://thebuildingcoder.typepad.com/blog/2017/01/virtues-of-reproduction-research-mep-settings-ontology.html#3
Related
I am trying to find Landing Spaces as well as Intermediate Landings for Ramps using Revit API, for a few of my models. So far I have tried to find Start and Endpoints of the ramp using location parameters as mentioned in the following blog space (How to find start/end of ramp in revit, perhaps with sketches?) , but it seems that this parameter is unavailable in the models I am trying to use.
I tried to explore any other way using Revit API functionalities but with no visible success so far. Also, I am new to Revit Api's and as such have a limited understanding of what features are available in API.
Can someone help me Identify Ramp Landings or Ramp endpoints?
Ramp Location
Ramp Property Pallete
I see three possible approaches:
Location
Sketch
Geometry
Using the Location property, casting it LocationCurve and grabbing the endpoints from that as suggested in the other discussion you link to would be the optimal solution.
Another approach mentioned in that thread is to use the sketch defining the ramp to determine its start and end points. Getting hold of the sketch elements is not completely trivial, but absolutely doable, as explained in The Building Coder discussions on
Stable Reference Relationships
Retrieving and Snooping Dependent Elements
If all else fails, the final alternative would be to grab and analyse the ramp geometry to deduce the required information from that.
We're using cucumberJS on a fairly large codebase with hundreds of cucumber scenarios and we've been running into issues with steps reuse.
Since all the steps in Cucumber are global, it's quite difficult to write steps like "and I select the first item in the list" or similar that would be similarly high-level. We end up having to append "on homepage" (so: "I select the first item in the list of folders on homepage") which just feels wrong and reads wrong.
Also, I find it very hard to figure out what the dependencies between steps are. For example we use a "and I see " pattern for storing a page object reference on the world cucumber instance to be used in some later steps. I find that very awkward since those dependencies are all but invisible when reading the .feature files.
What's your tips on how to use cucumber within a large team? (Including "ditch cucumber and use instead" :) )
Write scenarios/steps that are about what you are doing and why you are doing it rather than about how you do things. Cucumber is a tool for doing BDD. The key word here is Behaviour, and its interpretation. The fundamental idea behind Cucumber and steps is that each piece of behaviour (the what) has a unique name and place in the application, and in the application context you can talk about that behaviour using that name without ambiguity.
So your examples should never be in steps because they are about HOW your do something. Good steps never talk about clicking or selecting. Instead they talk about the reason Why you are clicking or selecting.
When you follow this pattern you end up with fewer steps at a higher level of abstraction that are each focused on a particular topic.
This pattern is easy to implement, and moderately easy to maintain. The difficulty is that to write the scenarios you have to have a profound understanding of what you are doing and why its important so you can discover/uncover the language you need to express yourself distinctly, clearly and simply.
I'll give my standard example about login. I use this because we share an understanding of What login is and Why its important. Realise before you can login that you have to be registered and that is complex.
Scenario: Login
Given I am registered
When I login
Then I should be logged in
The implementation of this is interesting in that I delegate all work to helper methods
Given I am registered
#i = create_registered_user
end
When I login
login_as(user: #i)
end
Then I should be logged in
should_be_logged_in
end
Now your problem becomes one of managing helper methods. What you have is a global namespace with a large number of helper methods. This is now a code and naming problem and All you have to do is
keep the number of helper methods as small as possible
keep each helper method simple
ensure there is no ambiguity between method names
ensure there is no duplication
This is still a hard problem, but
- its not as hard as what you are dealing with
- getting to this point has a large number of additional benefits
- its now a code problem, lots of people have experience of managing code.
You can do all these things with
- naming discipline (all my methods above have login in their name)
- clever but controlled use of arguments
- frequent refactoring and code cleaning
The code of your helper methods will have
- the highest churn of all your application code
- the greatest need to be simple and clear
So currently your problem is not about Cucumber its about debt you have with your existing scenarios and their implementation. You have to pay of your debt if you want things to improve, good luck
Does anyone know what the "Steam Method" is that Dijkstra refers to in "Structure of 'The'-Multiprogramming System"? This paper is very old (from 1968), but lays down some of the ground work for much of modern day programming. Here is the context it appears in below:
The construction stage has been rather traditional,
perhaps even old-fashioned, that is, plain machine code.
Reprogramming on account of a change of specifications
has been rare, a circumstance that must have contributed
greatly to the feasibility of the "steam method." That the
first two stages took more time than planned was somewhat
compensated by a delay in the delivery of the
machine.
Note: I am suspecting that this may be a typo, and it could refer to the "stream method". If it is the stream method, I would like to see what this method is, and if it fits in the context here.
In reading through the paper, it appears to be a self-referencing summation.
Take for instance, page 341 where the goal is stated:
The primary goal of the system is to process smoothly a continuous flow of user programs as a service to the University.
And then in further describing the system on page 343:
Therefore we have arranged the whole system as a society of sequential processes, progressing with undefined speed ratios.
And within that same paragraph, two other items are quoted in an effort to name a particular item of the system.
Now, if we jump back to page 342, the system is described as uni-directional:
There is no common data base via which independent users can communicate with each other: they only share the configuration and a procedure library.
So both in his manner of speaking and description of The Multiprogramming System being developed at the time, the system being deployed can reasonably be seen as being described as using the "steam method" conceptually created by the 6 mathematicians working on the project.
NOTE: Citations and page numbers are taken from the paper here
I am profiling memory usgae in my application using ANTS profiler and it shows that large amount of memory is held up in generation 2 by Excell cell object. Application is using EPPlus library to generate excel file.
I am attaching some of the graph generated by the tool. I am not sure how to drill further to figure out which object is holding reference & eating up memory. Please provide your suggestion on how to drill further into the graph.
The problem is: This graph again points tp same object. I think I am not using this tool properly.
Thank you
Firstly- only you, as the developer, know if those Excell objects should be in memory or not (how would an outside observer know whether these were cached objects or not, for example)? You could present info on whether Dispose had been called on those objects perhaps.
Secondly- do you see where it has given you a warning of Large Object hap fragmentation? I'd investigate that first.
Looking at the two snapshots you have taken (from summary screen) I am lacking context of the workflow for each snapshot, So I am going to make some assumptions:
Snapshot 1: is prior to you creating an Excel file.
Snapshot 2: is after you have created the Excel file and you deem this action completed.
Firstly I would recommend you slightly adjust your workflow and do the following snapshots.
Snapshot 1: taken prior to creating an Excel file.
Snapshot 2/3: Depends on the applications workflow; if you create data (can view it etc), then create a file after the fact from this data then take a snapshot after data generation and then another after file creation.
Final snapshot: Take one final snapshot - this is good practice to get a better feel of what is in memory after a completed workflow as it allows for clearing of finalizer queue.
There is going to be no answer here as it is hard to do this from a few screenshots - just advice - I have no knowledge of your application, and making assumptions about your desired memory usage like caching of data etc.
(a) Using the Instance Categorizor view with Categorized References selected you need to start at top(only) reference chain and work right to left. Again making assumptions (simplistic ones) look beyond nodes that are part of the Excel library and see what class is referencing it.
At this point this will either give you enough to look for that reference in code (b) or a starting to point to explore deeper (c). (a) if you think this reference chain(right to left path) is not worth pursuing then move to the next one down. With the Instance Categorizor view you work Right-Left, Top-Botton.
(b) If you have source code you can rght-click on a node and browse to the class in Visual Studio. Or just go there yourself :>
(c) By exploring a reference chain from (a) deeper I mean to using the link "Show the instances on this path" then making a judgment from the displayed metrics (size, Distance from GC root) choose an instance of the class to explore in more details. This will take you to the Instance Retention Graph which shows you the reference chain for that instance in more details. Pay attention to tool tips here, coloured regions and the type of node all mean various things. See my links below.
I think what is clear from this answer is you would likely benefit from looking at the AMP documentation since there is a lot to learn and I have only taken an extremely high level walk through the application with you and I have made many (far to many) assumptions.
See links for some help:
Class view filters
Instance Categorizor
Instance retention graph
Large object heap fragmentation tips <- As pointed out by other poster.
Red Gate's learning portal for the Memory profiler <- Perhaps look at Videos and the Technical Papers sections
I hope that gets you started.
I have a requirement to add fields onto a form based on data from another set of entities. Is this possible using an event script or does it require a plugin?
Given that I understand your assignment correctly, it can be done using JavaScript as well as a plugin. There is a significant difference that you need to take into consideration.
Is the change to the other entities to be made only when an actual user loads a form? If so, JS is the right way.
Or perhaps you need to ensure that those values are written even if a console client or system process retrieves the value of the primary entity? In that case, C# is your only option.
EDIT:
Simply accessing the values from any entity in the onload event can be done using a call to oData. I believe someone else asked a similar question recently. The basic format will look like this.
http://Server:Port/Organization
/XrmServices/2011/OrganizationData.svc
/TheEntityLogicalNameOfYoursSet()?$filter=FieldName eq 'ValueOfIt'
Some extra remarks.
If you're targeting on-line installation, the syntax will differ, of course, because the Schema-Server-Port-Organization are provided in a different pattern (https, orgName.crm4.something.something.com etc.). You can look it up on Settings.
Perhaps it should go without saying and I'm sure you realize it but for completeness' sake, TheEntityLogicalNameOfYours needs to be substituted for the actual name (unless that is your actual name, in which case I'll be worried, haha).
If you're new to this whole oData thingy, keep asking. I got the impression that the info I'm giving you is appreciated but not really producing "aha!" experience for you. You might want to ask separate questions, though. Some examples right off the top of my head.
a. "How do I perform oData call in JavaScript?"
b. "How do I access the fetched data?"
c. "How do I add/remove/hide a field programmatically on a form?"
d. "How do I combine data from...?"