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

Re: ElementTransformUtils.CopyElements (from linked document)

$
0
0

This is something that can be done, and it is done by using the "ExtentElem" element within the view. I posted a solution to this on the Dynamo forums but it is based on the observations of another post about copying Legends.

 

https://forums.autodesk.com/t5/revit-api-forum/elementtransformutils-copy-legend-from-linked-document-doesn-t/m-p/9253169

 

Not sure if it a "hack" or not, but if you grab just the ExtentElem out of all the ements and use the CopyElements (fromview,elemIds,toview,transform,options) then it creates a new view rather than trying to paste it into the designated view.

 

https://forum.dynamobim.com/t/transfer-project-standards/44975/14?u=seanp


Re: Access the UIDocument inside an Iupdater

$
0
0

Get it from the doc.

 

UIDocument uidoc = new UIDocument( doc );

can not Delete CADLinkType

$
0
0

Hi All

I have this one Imported Category in project that I wish to delete. I see it in CADLinkType in snoopDB.

I used API to find all CADLink Types but it seems that I can't delete them. (An exception is thrown)

stingers80-cgarchitect_0-1588540570579.png

 

Then I changed the code to find all 'ImportInstance' which finds nothing.

 

I just can't get rid of this imported dwg. I can't find it anywhere in project.

Even after selecting CADLinkType by SnoopDB I can't delete it.

 

I saw other threads similar to this with no solution.

Is there a way?

 

Update the views

$
0
0

Hello everyone,

 

i want to update all the opened views when the user pan, zoom in or zoom out on the active view.

for that i used an IUpdater, i want to know the type of change to use to trigger the Updater for now this is the change i am using but it's not working:

 

ElementClassFilter filter = new ElementClassFilter(typeof(View)); UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), filter, Element.GetChangeTypeAny());

 

Thanks in advance.

Re: Update the views

$
0
0

Zoom in Zoom out will never commit any transaction, which means your Updater will never be called.

Use Idling event to achieve this.

Inpect the UIView class carefully.

Honestly I had implemented a full-function in our product, but cannot share codes in this forum. You can ask any further questions inside this thread or use the below mentioned e-mail to contact me.

 

Pay more attention to the following:

  • UIView.GetZoomCorners()
  • UIView.ZoomAndCenterRectangle()

If your requirements are limited to "automatically" zoom all other views when the user zooms a view, you won't need to start any transaction, and no Updater will be called. That's the thing you need to know.

 

What's more, I myself is planning to sperate my "Relate Views" function from our product and might share it in GitHub in the future. Here might be a good chance to communitate with any other developers about such a topic. 🙂

 

Nice coding day.

Re: access app in a button command - Windows Forms

$
0
0

I solved the issue, by adding the Form in a separate Namespace, with a new ExternalCommandData.

Then, I instantiate a new type for the Form.

Re: File Disappeared After Attempt to Cloud Render

$
0
0

I certainly hope someone can help you save your work.

 

Unfortunately, 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.

 

I hope this clarifies.

 

Thank you for your cooperation and understanding.

 

Best regards,

 

Jeremy

 

Re: Add select box to taskdialog


Re: Set material to a family intance

Re: Getting parameters assigned to a label

Re: [Revit API] Converts a "Revit Elements" to solids and creates a fa

Re: Dependency Version Conflict (Assembly Binding for .DLLs)

Re: WindowsForm dynamic update

$
0
0

If you want your form to remain open while at the same time continuing interaction with Revit independently of the form, it must indeed remain modeless, just as you have it now.

 

To obtain access to the Revit API from the modeless context, you need some way to enter a valid Revit API context. One such possibility is provided by the external event mechanism, demonstrated by the Revit SDK Sample ModelessDialog/ModelessForm_ExternalEvent.

 

Re: Python in Dynamo video tutorial(Dynamo之Python编程教学视频)

$
0
0

That looks like a really impressive series of videos!

 

I tried to turn on subtitles but saw no possibility to do so, so I cannot comment on the quality.

 

Thank you very much for this impressive collection and massive amount of work!

 

Re: Create new Report?

$
0
0

I asked the development team for suggestions for you...

 


Re: WindowsForm dynamic update

$
0
0

Hi ,

Thanks.

 

Do you mean to say that in order to keep the Form open while I'm selecting objects, I need to start a Transaction, select/pick objects, and then Commit the transaction to return back to the Form and update it?

Re: Add select box to taskdialog

$
0
0

Thanks Jeremy.

 

i think i saw it before. 

if i understand right the ability of taskdialog is limited.

 

 

if i want something more complicated i need to go through WINDOWS FORM?download.png

Re: WindowsForm dynamic update

$
0
0

No, I mean to say that you need to implement an external event as demonstrated by the sample I pointed out.

 

Re: Add select box to taskdialog

Unique Model Ids without storing anything to models

$
0
0

I'm trying to collect some Revit usage statistics, but I have a problem with model ids. It's known that some Revit models have identical ids (for example link ), but is there a way to get unique ids without doing any modification to the model (so for example this won't work)?

 

To make this more complicated, is it possible to have same guid for the central model, detached models and local models?

Viewing all 66666 articles
Browse latest View live


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