Thank you Jeremy!
I want that by starting my plug-in, the revit goes into the edit surface mode (that is, I need a PostableCommand).
There I want the user to continue to interact with my plugin to insert points along the selected lines.
Re: How can I launch my plugin from the surface edit mode?
Re: How to place a Pipe flange using Revit API
tried creating pipe with all the overloads for Pipe.Create
Didnt work..
Eventually I will do it the hard way round if nothing works...
But since you suggested to disconnect the connectors.. How do I do that??
Two Addins from the same .dll in two locations
Is this possible?
My situation is that I am trying to have one .dll that contains an IExternalApplication and an IExternalDBApplication. One .addin points at the IExternalApplication in the assembly at one location with an absolute path. Another .addin points at the IExternalDBApplication that uses a relative path to another location since it is meant to be run on Forge.
Revit is loading both addins from the relative path, which is causing issues since some of my code depends on the assembly location. Anyone know of a way to fix this or am I just going to have to bite the bullet and make it two projects?
Re: Array of Boxes (FilledRegion)
Thank you very much!
How to access ducts connected to a particular duct?
I'm trying to figure out how to get the duct elements attached to a particular duct. I'm wanting to "traverse" my ductwork and run some numbers. However, I'm not sure how to do this.
At the moment, I am using the Connector Manager and iterating through the Connectors. When I ask for the Connector's owner, it just gives me the duct I am looking at and not the other ducts it's connected to.
Am I going about this the wrong way? Or do I need to match every connector to every piece of duct using the IsConnectedTo method?
Cheers!
Re: Automatically Connect Load to Panel
Thanks for the reply
Re: How to Make Installation Package
Re: BIM 360 REST API to get Model Size?
Hi Mehdi,
It's nice to hear that you found your own solution without playing with the Forge.
Cheers,
Cursor Jump to Project Browser While Switching between Projects
Dear API Community,
While I switch between projects, the cursor jumps to the Project browser/Properties palette.
I manage to find why. It is because of the mouse settings.
While I set the mouse cursor to "Automatically move the pointer to the default button in a dialog box, the cursor starts to behave in this way.
If I uncheck it, it works normally.
I believe this might be a bug.
Anyway, if anyone got a solution to fix this, kindly advise me.
Because it's quite annoying and the screen got a major jerk.
I attached a video to have better clarity on the issue.
Re: How to Get and Set Project Paramters????
Hi
Have you tried the below code?
ParameterSet pS = doc.ProjectInformation.Parameters as ParameterSet; if(pS!=null) { foreach(Parameter p in pS) { if(p.Definition.Name.Contains("your parameter name")) { p.Set(parametervalue); } } }
Re: How can I launch my plugin from the surface edit mode?
Dear Ilya,
Thank you for your update and clarification.
If you use PostCommand to launch a built-in Revit command, you get the full built-in Revit functionality with no possibility to modify or interact with it.
You get all or nothing.
If you are happy with that, go ahead.
If you wish to mix in your own functionality with the built-in Revit stuff, it will be much harder, or maybe impossible.
I hope this helps.
Best regards,
Jeremy
Re: Solid as OpenShell DirectShape
Hi,
Thanks Jeremy. Yes i feel i'm almost there. The progress i've made is creating Tessellated faces (see earlier posts)
With the same ShapeBuilder i now can build non triangled faces, only if they are planar (see image1, simple box) and they are individually selectable, what i need!
When using this with an object that doesn't have all planar faces you see it not creates all the single faces (image2)
The result i need is the same as image3 but this is a solid shape and i need individually faces. So the conclusion for now is that Tessellated builder can't build my non planar shape in individually faces that aren't triangled. Anyone an idea what the right builder?
List<Solid> sol = new List<Solid>();
Solid loft = GeometryCreationUtilities.CreateLoftGeometry(profileLoop, options);
sol.Add(loft); foreach (Solid s in sol) { foreach (Face f in s.Faces) { Build_Tessellate2(f); ElementId categoryId = new ElementId(BuiltInCategory.OST_GenericModel); DirectShape ds = DirectShape.CreateElement(doc, categoryId); ds.ApplicationId = System.Reflection.Assembly.GetExecutingAssembly().GetType().GUID.ToString(); ds.ApplicationDataId = Guid.NewGuid().ToString(); foreach (TessellatedShapeBuilderResult t1 in Build_Tessellate2(f)) { ds.SetShape(t1.GetGeometricalObjects()); ds.Name = "Single_Surface"; } } }
public List<TessellatedShapeBuilderResult> Build_Tessellate2(Face faces) { Mesh mesh = faces.Triangulate(); List<XYZ> vert = new List<XYZ>(); foreach (XYZ ij in mesh.Vertices) { XYZ vertices = ij; vert.Add(vertices); } TessellatedShapeBuilder builder = new TessellatedShapeBuilder(); builder.OpenConnectedFaceSet(false); //Filter for Title Blocks in active document FilteredElementCollector materials = new FilteredElementCollector(m_revit.Application.ActiveUIDocument.Document) .OfClass(typeof(Autodesk.Revit.DB.Material)) .OfCategory(BuiltInCategory.OST_Materials); ElementId materialId = materials.First().Id; builder.AddFace(new TessellatedFace(vert, materialId)); builder.CloseConnectedFaceSet(); builder.Target = TessellatedShapeBuilderTarget.AnyGeometry; builder.Fallback = TessellatedShapeBuilderFallback.Mesh; builder.Build(); TessellatedShapeBuilderResult result3 = builder.GetBuildResult(); List<TessellatedShapeBuilderResult> res = new List<TessellatedShapeBuilderResult>(); if (result3.Outcome.ToString() == "Sheet") { res.Add(result3); } return res; }
Re: insert windows family plugin
Hello, can I get help with this API? I don't understand why it doesn't work.
Thank you
Re: Solid as OpenShell DirectShape
You say, '... an object that doesn't have all planar faces ... (image2)'.
However, as far as I can tell, all the faces in image2 are planar after all.
Why do you say they are non-planar?
Re: Solid as OpenShell DirectShape
It's hardly to see in the image.
Attached you can find the RVT model as a solid
Security - Signed Add-In error
I have been working with Autodesk techs for several weeks and they cannot seem to come up with a solution to the error message I get when I fire up Revit 2019.2.1
I am greeted with a pop-up message "Security - Signed Add-In" for the add-in app DPR Model Slicer. Although I choose 'Always Load', the certificate is not loaded into Revit or the Windows registry.
I have loaded other 'signed add-ins' and get the same error message. However, when an UNSIGNED add-in is loaded, I get the options to Always Load, Load Once, Do Not Load. Choosing Always Load, the pop-up is never seen again and the add-in is loaded into the Windows registry. Here is the catch, the error only appears in Revit 2019...not 2018 or 2020...???
Does anyone here have a clue what can be done to resolve this nuisance pop-up window without simply removing add-ins that I use every day and have used without faults for several years?
Re: Cursor Jump to Project Browser While Switching between Projects
Dear Radish,
Thank you for your query.
I do not see why you submitted this to the Revit API forum, though.
Are you observing this behaviour in your own add-in, or in the built-in Revit functionality?
In the former case, can you not fix the problem yourself?
In the latter case, please note that this discussion forum is dedicated to programming Revit using the Revit API.
Therefore, you cannot expect an answer to a question such as yours relating to installation, product usage or end user support issues here.
You should try one of the non-API Revit product support discussion forums instead for that:
The people there are much better equipped to answer your question than us programming nerds.
I hope this clarifies.
Thank you for your cooperation and understanding.
Best regards,
Jeremy
Russian letters doesn't export in lookup tables
Hello!
We've faced with the following issue: lookup tables with russian letters exports incorrectly (via GUI or via API, doesn't matter). The problem is that a data with at least one russian symbol doesn't export at all, however Revit undertand and show this letters correctly.
Steps to reproduce:
1. Import .csv file with the following data:
,B##length##millimeters
РУССКИЕ БУКВЫ,150.000000
РУССКИЕ LETTERS,150.000000
ENGLISH LETTERS,150.000000
2. Export this table. Exported table will contain:
,B##length##millimeters
,150.000000
,150.000000
ENGLISH LETTERS,150.000000
Revit's interface is Russian (of course :)). The issue is reproducing in Revit 2018, Revit 2019 and Revit 2020.
Re: How can I launch my plugin from the surface edit mode?
Thanks Jeremy!
In general, this was the idea.
So I'm not sure that "or maybe impossible" will help me ...
I hope that "it will be much harder".
Is there a possibility to place my add-in button to the ribbon of surface editing, which will allow the user to call it from there?
How do I hide text of an Autodesk.Revit.UI.RibbonItem?
I've found posts regarding the ability of the Autodesk.Windows (adWin) ribbon objects to hide the text through the ShowText Boolean property. However, I have already built most of my application with the Revit.UI button types, and am wondering if it's possible to somehow hide the text for stacked PushButtons, as shown in the attached image of the clipboard panel. I would prefer to find a way to either convert one namespace button type into the other namespace (Revit.UI => adWin, or vice versa) to achieve this rather than completely rewriting my OnStartup function to utilize the adWin namespace button types. Is this possible? Or is there some trick for Revit.UI button types that hide text without having to set the property to ChrW(20) (which also "hides" the text in the tooltip)? Or do I need to just start converting my OnStarup function to adWin?
I'm looking to make a sort of matrix of stacked buttons, and to be forced to keep text visible in the ribbon would expand the width of my panel far beyond what I'm willing to allow.