Can you use PickObjects instead of PickObject? That lets the user select multiple objects and it provides a "finish" button at the top of the screen the user can press when they are finished selecting objects.
Can you use PickObjects instead of PickObject? That lets the user select multiple objects and it provides a "finish" button at the top of the screen the user can press when they are finished selecting objects.
Hi All,
I got some issue on pipe diameter measurement. After creting pipe, the diameter value that shown in option bar is quite different from the value that i set in c# code (seee in following figure)
here is my revit api code:
Pipe pipe = Pipe.Create(doc, domesticHotWaterSystemType.Id, firstPipeType.Id, level.Id, p0, p1); Parameter parameter = pipe.get_Parameter(BuiltInParameter.RBS_PIPE_DIAMETER_PARAM); parameter.Set(1);
According to the picture, the diameter that measured in display is 305mm but the option always shows 200mm
can u guys enlighten me how to do it? quite noob in revit api.
Best Rgds,
Mr.Naing
I think Steve has summarized the gist of it very nicely; it should get Bunkgay off he ground with developing his/her first add-on. There is a lot more to add, eventually, but I am confident that Bunkgay will figure it out in due time. That is why I want to point only one small detail.
Bunkgay, please do not store the UIControlledApplication object in a global variable. It is a big no-no in Revit add-in development. You cannot use it except during times Revit calls you (in an event, command, macro, updater, etc.) and when Revit calls you it always gives you the data you may need at the given situation. If that situation requires you having the Revit application object, Revit will give it to you then. On the other hand, if you are not supposed to use the Revit Application object, Revit will not give it to you, naturally, and you will not be able to use the object you stored in the global variable either.
Thanks
I thought of it but unfortunatly it does not return objects in the same order the user selected which is important in my case.
I'm experimenting with ReferenceIntersector and I don't understand the problem i'm having with distance. I'm filtering for columns and If I use 'referenceIntersector.Find' it returns a list of columns intersecting along the direction. But if I use 'referenceIntersector.FindNearest' I can only get a column if it's less than 1'-6" away. What am I missing or what should I be looking for? My start and direction XYZ are both (0,0,0).
ElementFilter columnFilter = new ElementCategoryFilter(BuiltInCategory.OST_StructuralColumns); ReferenceIntersector referenceIntersector = new ReferenceIntersector(columnFilter, FindReferenceTarget.Element, view3D); ReferenceWithContext referenceWithContext = referenceIntersector.FindNearest(_rayStart, _rayDirection);
Hello everybody!
I am tryin to get the model exttent in order to create its bounding box. It seems to me that it is not dificult, but I have been looking for it without result...
I have seen that the view has an "outline", but it does not get me that I am looking for.
Any help?
thanks in advance!
I didn't knew such a petty thing would pest me so much.
All I want to do is place a side wall sprinker on a pipe which is open ended. I used:
FamilyInstance fi = Command.doc.Create.NewFamilyInstance(c.Origin[pipes connector which is open end], symbol[family symbol], pp[pipe], pp.ReferenceLevel, StructuralType.NonStructural);
fi.get_Parameter(BuiltInParameter.INSTANCE_FREE_HOST_OFFSET_PARAM).Set(pipeoffsetValue);
what is get is this:What I want is
Thanks & Regards
Sanjay Pandey
Join all model elements to an assembly instance, take its bounding box, remove assembly instance? (maybe not the best way)
What values are assigned to this pipe in MEP-system properties?
Show the screenshot of pipe dimension parameters...
Hi,
add
element.get_Parameter(PHASE_CREATED).Set(phaseCreated.Id);
or
element.get_Parameter(PHASE_DEMOLISHED).Set(phaseCreated.Id);
Revitalizer
RevitLookup is your friend...
I've known about this one for quite a while and I mentioned it here back in July 2013 when I had a different account, but I've just come up against it again myself and it had me scratching my head for a few minutes until I remembered, so I thought I'd bring it up to see if we can get this sorted out.
The API documentation for View.Outline states: The bounds of the view in paper space (in inches). while the values returned are actually in feet.
This is either a bug or simply an error in the documentation.
While it does make sense for the Outline to be in inches as described, For consistency I would think it best that all lengths and positions use the same units so I believe it to be the documentation that is incorrect here and not the implementation.
Hi,
you want create a new pipe with a diameter equal to 304.8mm but this diameter doesn't exist in Revit when you start a new project. You must first create diameter in Mechanical Settings :
Look in the revit help in the contents under developers- introduction- add-in integration- ribbon panels and controls.
you can add radio buttons combo boxes, text boxes, and other items to the ribbon panel with the API.
Im not sure, but they may have something that will make it easier to get what you want than using the basic "button".
This may be exactly what I was looking for. Thanks a bunch. I'll be looking through this for the next little while.
Yes, the three lines in my last post worked fine.
You can use the Sharp develop included with revit to write macros in Python, but it's more limited than using visual studio. You are always tied to the sharp develop editor, it's basically a macro not an external application you can compile. i think you always have to run the macro from the editor.
If if you are still interested I have a couple of things on my website at:
sites.google.com/site/revitapi123
See the Sharp Develop Python 1st example.
Awsome.
But I had to add one thing:
element.get_Parameter(BuiltInParameter.PHASE_CREATED).Set(phaseCreated.Id);
and;
element.get_Parameter(BuiltInParameter.PHASE_DEMOLISHED).Set(phaseCreated.Id);
Hi Cari,
I see Remy gave you a good head start to your workset question and also some more information on how to get started with Revit API development, but I'm just adding a couple of links for you to get a more info and speed up your learning process.
My First Revit Plugin
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=16777469
And here is a link to the Revit Developers guide in the Help section of Revit.
http://help.autodesk.com/view/RVT/2016/ENU/?guid=GUID-F0A122E0-E556-4D0D-9D0F-7E72A9315A42
If you need any further help let us know.
Happy Coding!
Cheers,
Hi,
How do I create a angular dimension via api similar to Annotate->Angular.
Thanks & Regards
Sanjay Pandey