![]() Let’s first examine what a Shared Project is. This has been added as a new feature back in Visual Studio 2015, but I haven’t really heard of it until few months ago. This in fact might be the best solution for their unique problem, but I thought that I share another approach that I have learned recently. ![]() Now, don’t take this as I am telling you that Matteo is wrong. ![]() The only reason I am even touching this subject is because I have recently saw a post on Speckle Blog, that discussed this same approach, and they opted for Configurations. At the time I thought that Configurations was the right way to go, but as you can guess, I no longer think that’s true. Basically, the issue was that I needed to maintain multiple versions of my Revit plugin, to match multiple versions of Revit that I wanted to support. Or fix the problem (usually by deleting certain elements).Obviously, I wrote about this topic some time ago. The document is in failure mode: an operation has failed,Īnd Revit requires the user to either cancel the operation There is no loaded tag type that can be used when tagging referenceToTag with tagMode. The ElementId ownerDBViewId is a perspective view.Ī value passed for an enumeration argument is not a member of that enumeration The ElementId ownerDBViewId is a view template. The ElementId ownerDBViewId does not correspond to a View. NewTag.LeaderEndCondition = LeaderEndCondition.Freeĭim elbowPnt As XYZ = wallMid + New XYZ( 5.0, 5.0, 0.0)ĭim headerPnt As XYZ = wallMid + New XYZ( 10.0, 10.0, 0.0) ' set leader mode free ' otherwise leader end point move with elbow point Dim type As WallType = wall.WallTypeĭim foundParameter As Parameter = type.LookupParameter( "Type Mark")ĭim result As Boolean = foundParameter.( "Hello") The label parameter for the tag family determines ' what type parameter is used for the tag text. If newTag Is Nothing Then Throw New Exception( "Create IndependentTag Failed.")Įnd If ' newTag.TagText is read-only, so we change the Type Mark type parameter to ' set the tag text. ' Add the tag to the middle of the wall Dim wallLoc As LocationCurve = Tr圜ast(wall.Location, LocationCurve)ĭim wallStart As XYZ = ( 0)ĭim wallEnd As XYZ = ( 1)ĭim wallMid As XYZ = ( 0.5, True)ĭim WallRef As Reference = New Reference(wall)ĭim newTag As IndependentTag = IndependentTag.Create(document, view.Id, wallRef, True, tagMode_1, tagorn, wallMid) ' define tag mode and tag orientation for new tag Dim tagMode_1 As TagMode = TagMode.TM_ADDBY_CATEGORYĭim tagorn As TagOrientation = TagOrientation.Horizontal ' make sure active view is not a 3D view Dim view As .View = document.ActiveView Private Function CreateIndependentTag(document As .Document, wall As Wall) As IndependentTag XYZ elbowPnt = wallMid + new XYZ( 5.0, 5.0, 0.0) NewTag.LeaderEndCondition = LeaderEndCondition.Free ![]() set leader mode free // otherwise leader end point move with elbow point Parameter foundParameter = type.LookupParameter( "Type Mark") īool result = foundParameter.Set( "Hello") The label parameter for the tag family determines // what type parameter is used for the tag text. newTag.TagText is read-only, so we change the Type Mark type parameter to // set the tag text. Throw new Exception( "Create IndependentTag Failed.") IndependentTag newTag = IndependentTag.Create(document, view.Id, wallRef, true, tagMode, tagorn, wallMid) LocationCurve wallLoc = wall.Location as LocationCurve TagOrientation tagorn = TagOrientation.Horizontal TagMode tagMode = TagMode.TM_ADDBY_CATEGORY define tag mode and tag orientation for new tag make sure active view is not a 3D viewĪ.View view = document.ActiveView Private IndependentTag CreateIndependentTag(.Document document, Wall wall) Tag by category, multi-category tag, and material tag are allowed.įor tags without leaders, this point is the position of the tag head.įor tags with leaders, this point is the end point of the leader, and a leader of default length will be created from this point to the tag head. This argument determines the type of tag that will be created. When true, the tag will be created with a straight leader with an attached end. The reference can be to an element or subelement in a local or linked document. The view in which the tag will be visible. The document to which the tag will be added.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |