Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ViewPlan.Duplicate incorrect when TransactionMode is automatic

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
553 Views, 3 Replies

ViewPlan.Duplicate incorrect when TransactionMode is automatic

I am having issues with ViewPlan.Duplicate(ViewDuplicateOption.AsDependent) when i have the TransactionMode set to automatic in my ExternalCommand.

 

The problem is that some parameters are not inherited / duplicated correctly for the first duplicated viewtemplate. When i change the transactionmode to manual and do the transactions manually. Everything is duplicated as expected.

 

The parameters that are incorrect only in the FIRST duplicated view are:

 - View Scale

 - Scale value

 

 

And some others... which i dont seem to remember.

 

So what i do.

 

- Create a ViewPlan

- Apply a Tempalte to the created Viewplan

- In a loop Duplicate the ViewPlan, as param give: ViewDuplicateOption.AsDependent, duplicate it a N times.

- Check the first Dependent ViewPlan, and compare it to the ViewPlan we depend on, and compare it to the other Dependant ViewPlans.

- The first Dependend ViewPlan has incorrect parameters.

 

The fix for now is, set the TransactionMode to Manuall.

 

(additonal question: is there a Revit SDK / Api issue tracker?)

3 REPLIES 3
Message 2 of 4
augusto.goncalves
in reply to: Anonymous

Thanks for reporting it, I'll escalate

About the "tracker", unfortunately there is no such a tool... sorry
Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 3 of 4

Augusto will report the problem as a bug. However, please keep in mind that using manual transaction mode should be your only approach going forward - it should not be just a workaround for your current problem. The automatic transaction mode is very troublesome and probably causes more problems than it tries to solve. It is really there just for back-ward compatibility. We will phase it out of Revit eventually. I cannot advise strongly enough against using the automatic transaction mode.

 

Thank you

Arnošt Löbel
Message 4 of 4
crthomas
in reply to: Anonymous

It is still possible to have the same problem with TransactionMode set to Manual, if your transactions are not started and stopped correctly.

I have found that when I wrap the entire process (create parent view, loop through creating dependent views, etc) in one transaction, that I too have the first dependent view with improper scale, discipline, etc. But, if I make the creation of each dependent view a separate transaction, then the view properties are correct.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report