Quantcast
Channel: All Revit API Forum posts
Viewing all 67020 articles
Browse latest View live

Change the panel a connector is connected to

$
0
0

I've spent a few hours searching, and trying different things, but I can't seem to get or set the Panel that a device is connected to.

 

For example, if I select a receptacle, I want to be able to see and change the Panel that receptacle is connected to.

 

I've managed to get the connector for the selected item and assign it to "c".  But I cant get any farther.

 

I've tried:

 

MEPFamilyConnectorInfo famConnInfo = c.GetMEPConnectorInfo () as MEPFamilyConnectorInfo ;
        	ParameterValue param = famConnInfo.GetConnectorParameterValue( new ElementId(BuiltInParameter.RBS_ELEC_CIRCUIT_PANEL_PARAM));
        	TaskDialog.Show("RBS ELEC CIRCUIT PANEL PARAM:", param.ToString ());

I can't seem to convert the ParameterValue param to anything useful.  Trying to use .ToString() causes an error.

 

 

 

 


How to pick point while on a form

$
0
0

I building an app that insert a few thing. First one choose what he want from a combobox then click on insert button.

What happend is the project browser and the properties dimmed and I could not come to the view to select. Sometime Revit carshed and no way only to stop the process from the activities manager. What I should do to make it work?

 

How to change a SturcturalConnectionHandlerType

$
0
0

Hello,

 

is it possible to edit the parameters for a StructuralConnectionHandlerType?

 

A StructuralConnectionHandler has a counterpart in the Advance API the UserAutoConnectionObjet / IJoint.

It can be used inside a FabricationTransaction to change StructuralConnectionHandler.

Is there also a counterpart for the StructuralConnectionHandlerType too?

 

 

Re: How to get temporarily hidden categories?

$
0
0

The method View. IsElementVisibleInTemporaryViewMode() checks for visibility given a specific TemporaryViewMode.

View v = doc.ActiveView;
ElementId catid = new ElementId(BuiltInCategory.OST_Doors);
bool isVisible =  v.IsElementVisibleInTemporaryViewMode(TemporaryViewMode.TemporaryHideIsolate,catid);

 

Element created from solid lost material property in family document

$
0
0
Hi everyone, I created a solid using the following code: SolidOptions options = new SolidOptions(material.Id, ElementId.InvalidElementId); Solid solid = GeometryCreationUtilities.CreateSweptBlendGeometry(pathCurve, pathParams, profileLoops, vertexPairs, options); If I create a DirectShape element using the solid in a project document, the DirectShape element has correct material appearance. But if I create the DirectShape element in a family document, the element just shows grey color and does not have any material appearance. I also tried creating a FreeFormElement using the solid in a family document, and got the same problem, no material appearance. I noticed in the properties browser that the material property is “By Category”. Could anyone please help me on this? How to give the element correct material appearance in the family document? Thanks,

ExternalEvent

$
0
0

Hi! I want to create ExternalEvent on button click. But I get exception: "Attempting to create an ExternalEvent outside of a standard API execution". When I checked the thread of the main window and the Command class, they were the same thread. What's the magic? I created the class for reseting event in Command class.

 

APLICATIVOS PARA REVIT 2019 NÃO FUNCIONANDO

$
0
0

Mensagem de " este complemento assinado não foi encontrado. O que deseja fazer? Aparece falando do certificado, tanto para o app lights quanto para o app cad to earth, eu preciso dos complementos para trabalhar. Se clico em" sempre carregar" eles simplesmente não aparecem no meu revit 2019.

The Ceiling height of a room

$
0
0

Hello everyone, i'm trying to find the Ceiling Height of a room, for a uniform ceiling i have managed to find the ceiling height just by dividing the volume of the room by it's area. However this doesn't work for a non-uniform ceiling. Any help 

Thanks in advance.


Re: printManager.SubmitPrint() issue

Re: How to get the REVIT execution path programtically?

$
0
0

The registry holds this information:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\Revit\2020\REVIT-05:0809

Name                           Data
InstallationLocation        C:\Program Files\Autodesk\Revit 2020\
InstallationType             standalone
Language                      English
ProductName                 Autodesk Revit 2020
SerialNumber                 xxx-xxxxxxxx
Version                         2020 (20.0.0.377)

 

There are lots of examples on line (including from Jeremy) to read the registry.

trouble reading entity schema

$
0
0

I seem to be having some trouble getting access to the entity schema I created.

 

About 7 years ago, I created an app that reads & writes a schema to the project info element. A year later I created another app that only reads this schema. Now I am updating the second app and I find with Revit 2019 it can no longer read the schema. I keep getting the error "Schema not available to this application" but in the schema builder the read\write access is set to vendor. The name, guid and vendor id are set the same in both apps. I can still get the schema with the latest version of the app that created it, it's just the second app that can't.

 

Is this a bug in the most recent API's?

Exterior face of wall opening

$
0
0

Hi! I know how to get planar faces of opening, but how determine planar faces which located on exterior face of wall? 

Watch window errors

$
0
0

When I debug the hello revit sample I get the error's BC31519 Archisoft in the watch window  (see attachment), how can I debug so I can see the values of variables ?

Re: Watch window errors

$
0
0

I found the solution :

 

I removed the plugin Archisoft ExportSchedule.bundle from the path      "c:\programdata\autodesk\applicationplugins"

 

 

Re: Exterior face of wall opening

$
0
0

Hi ,

 

You can use Wall.Orientation to get the external face normal vector which will help you get the face you want.

Please refer this for more information.

 

 


Re: The Ceiling height of a room

$
0
0

Hi ,

 

I'm not sure about what's non-uniform ceiling.

But if you want to get the ceiling height, instead of using dividing the volume by the room's area, try to use the built-in parameter "CEILING_HEIGHTABOVELEVEL_PARAM" of the ceiling to get the height.

Hope this helps.

Re: How to pick point while on a form

$
0
0

Hi ,

 

From your descriptions I can only guess it's because Revit does not support for multi-threading which means that before you finish your current work, you can not do anything further.

The above is just my guess, if you can provide more details(your code or a reproducible sample file), we can know better of your problem.

Accessing ActiveUIDocument from outside of "Execute" method

$
0
0

Hello Everyone! 
How to access the ActiveUIDocument from outside of the Execute method?

My goal is to get data from my active document, with a Button Click on a windows form.

Currently the method which is called by the button click, is within the same class, where the form was initialized. 

I was able to do it in macro editor (ThisDocument tdoc = new ThisDocument -> tdoc.ActiveUIDocument).

How to access it with a plugin?

 

Re: Using DesignScript in Revit addin

$
0
0

 I doubt that everything in Dynamo Geometry can be achieved by using Revit API. Could you find the intersections of two Faces in Revit API so that it returns a Face, Curve, or NotIntersected? I'm afraid not.

 

How to retrieve the Origin coordinates of location Curve in the wall?

$
0
0

Hi, all
I am confused on how to use the Revit API to get the "LocationCurve" origin coordinates of the wall. As the picture shows, I want to get the value of the "origin" parameter.


Q_19.jpg
Thanks for any help.

 

Viewing all 67020 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>