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

Re: Create inclined dimension between 2 parallel planes

$
0
0

Hi everybody, still I am not able to find solution for this. Can anyone help me out or direct me towards a sample code ? Thanks in advance

 

 


Re: Create inclined dimension between 2 parallel planes

$
0
0

First of all, please describe step by step how you achieve what you require manually through the user interface.

 

Second, please analyse the resulting model in detail using RevitLookup and other Revit database exploration tools:

 

https://thebuildingcoder.typepad.com/blog/2017/01/virtues-of-reproduction-research-mep-settings-ontology.html#3

 

I assume that one single dimensioning element is created by this operation, and it has references to the two planes.

 

The situation is quite similar to the creation of a dimension between two parallel walls.

 

That was demonstrated in full detail in two variations by The Building Coder:

 

 

Since you already have the two reference planes, the task should be significantly smaller and easier than in those two descriptions.

 

Re: Get or Set Global Parameter Group

TAG's MISLEAD ON EXPORT

$
0
0

The first image it's on revit sheet. This tag show's height of the item.

Teh second image it's on DWG.

 

 

 

revit.JPGcad.JPG

get_Parameter() return None (Null)

$
0
0

Hi,

I'm tried to used get_Parameter() method.

So, used Parameter is BuiltInParameter.SPOT_COORDINATE_INCLUDE_ELEVATION.

But, get_Parameter() method return by None(Null)

 

In a different way,

get_Parameter(SPOT_COORDINATE_BOTTOM_PREFIX) method return by Parameter. ( It's works well. )

 

# spot is SpotDimension / BP is BuiltInParameter
spot_param = spot.get_Parameter(BP.SPOT_COORDINATE_ELEVATION_PREFIX) # Return Parameter

spotCntStr = 'C_'
spot_param.Set(spotCntStr) # It's works well.

spot_param = spot.get_Parameter(BP.SPOT_COORDINATE_INCLUDE_ELEVATION ) # None (Null)

▲The above code is part of the code.

 

Why doesn't it work?

 

* Already used Transaction.

* If End user click (Dimension property) include elevation, It's working well.

 

Have a nice day 😄

Re: Execute External Command via Button on a Form

$
0
0

Hi.

You can transfer the code to a separate class, which can be run both from the command and using the button.
Required data (revitApplication, revitActiveDocument) must first be passed to the form when it is created, and the form can pass it on

Re: Execute External Command via Button on a Form

Re: get_Parameter() return None (Null)


Re: TAG's MISLEAD ON EXPORT

$
0
0

Is this a Revit API issue, or an end user question?

 

Are you doing anything programmatically yourself, or just using the standard Revit user interface?

 

If you are not doing anything programmatically, this is not the best place to ask such a question.

 

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:

 

https://forums.autodesk.com/t5/revit-api-forum/this-forum-is-for-revit-api-programming-questions-not-for/td-p/5607765

 

The people there are much better equipped to answer your question than us programming nerds.

 

If you are doing it programmatically, please be aware that the Revit API hardly ever supports any functionality that is not also available in the user interface.

 

Therefore, if the UI does not support this, the API will probably not do so either.

 

So, it will always help to research the optimal manual approach to a solution first, before attacking the task programmatically.

 

I hope this clarifies.

 

Thank you for your cooperation and understanding.

 

Best regards,

 

Jeremy

 

Re: How to change language for annotation text and dimension using api?

$
0
0

I think the annotation and dimension texts are stored in the Revit model, and Revit neither knows nor cares what language they are in after they have been created and placed.

 

I do not believe that Revit can translate an existing BIM from one language to another.

 

Is this a Revit API issue, or an end user question?

 

Are you doing anything programmatically yourself, or just using the standard Revit user interface?

 

If you are not doing anything programmatically, this is not the best place to ask such a question.

 

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:

 

https://forums.autodesk.com/t5/revit-api-forum/this-forum-is-for-revit-api-programming-questions-not-for/td-p/5607765

 

The people there are much better equipped to answer your question than us programming nerds.

 

If you are doing it programmatically, please be aware that the Revit API hardly ever supports any functionality that is not also available in the user interface.

 

Therefore, if the UI does not support this, the API will probably not do so either.

 

So, it will always help to research the optimal manual approach to a solution first, before attacking the task programmatically.

 

I hope this clarifies.

 

Thank you for your cooperation and understanding.

 

Best regards,

 

Jeremy

 

Programatically push Place on Work Plane button

$
0
0

Hi

I am calling

uidoc.PostRequestForElementTypePlacement(fs);

and then want to push the Place on Work Plane button (instead of leaving the user with the default Place on Vertical Face option).

Please see the attached screencast, which uses UISpy to invoke the Toggle method on the Place on Work Plane button. The Revit UI briefly flashes to activate Place on Work Plane but Place on Vertical Face remains the active button.

 

Any suggestions on how the API can be used to select Place on Work Plane?

 

Thanks

Harry

 

Cursor Tool Icon

$
0
0

Is there a way to change the cursor icon to a custom cursor when in an external command? I am looking for functionality similar to how the rotate, corner, and trim/extend tools operate with their cursor icon that includes the toolbar icon floating down and to the left of the default cursor.

Slider in Ribbon panel

$
0
0

Is it possible to add a "Revit slider" in the Ribbon Panel? I want to be able to show numbers (shown in a slider) to the user when he's modeling his project, in real time.

Is it possible, or do I necessary need to use a WPF window ?

Thank you in advance.

Re: TAG's MISLEAD ON EXPORT

$
0
0

I'm using the simple export function of Revit.

Sorry if it's not in this topic, first time here.

Re: Get or Set Global Parameter Group

$
0
0

Hi 

It's interesting but I found that it is actually possible to do it now.

 

GlobalParameter globalParameter = (GlobalParameter)DbApp.Document.GetElement(paramId);
// get
BuiltInParameterGroup group = globalParameter.GetDefinition().ParameterGroup;
// set
globalParameter.GetDefinition().set_ParameterGroup(BuiltInParameterGroup.PG_VISIBILITY);

Thanks


Re: Get or Set Global Parameter Group

$
0
0

Dear Sam,

 

Wow, yes, interesting indeed!

 

Thank you for letting us know!

 

Yet once again, the Revit API add-in developer community discovers a possibility that the development team is not aware of.

 

Best regards,

 

Jeremy

 

Re: Slider in Ribbon panel

$
0
0

I am not aware of any Revit API support for such a widget.

 

Re: Cursor Tool Icon

$
0
0

Yes, sure. 

 

A long time ago, before the advent of the filtered element collectors, Revit add-ins took significantly longer to retrieve elements from the database than they do today.

 

Back then, I regularly used the Windows .NET functionality to set the cursor to an hourglass.

 

You can examine my technique in the AdnRme HVAC sample:

 

https://github.com/jeremytammik/AdnRme

 

Look at the external command implementations that make use of the WaitCursor helper class:

 

https://github.com/jeremytammik/AdnRme/blob/master/AdnRme/WaitCursor.cs

 

Get definition of built-in parameter with-out having an element

$
0
0

Hi All

 

I want to get the StorageType UnitType and Parameter Type from built-in parameters when I don't have elements in my model that are using this parameter.

 

Is it possible to get the parameter definition of a built-in parameter with-out having an element in the model?

 

Re: Get definition of built-in parameter with-out having an element

Viewing all 66715 articles
Browse latest View live


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