Results 1 to 5 of 5

Thread: Draw Lines on Revit Macro Forms

  1. #1
    Member
    Join Date
    2017-03
    Posts
    2
    Login to Give a bone
    0

    Default Draw Lines on Revit Macro Forms

    Is it possible to draw lines on a form within the Revit Macro? VB.net

  2. #2
    Member
    Join Date
    2015-12
    Posts
    19
    Login to Give a bone
    0

    Default Re: Draw Lines on Revit Macro Forms

    Can you explain further? Do you mean a User Form in .Net? What is the significance of drawing 2D lines on a user form when you can do that without Revit?

  3. #3
    Member
    Join Date
    2017-03
    Posts
    2
    Login to Give a bone
    0

    Default Re: Draw Lines on Revit Macro Forms

    Example: I want to create a form that would show a baseplate with bolts. I would like to be able to draw the plate and change the dimensions or number and location of the anchor bolts and update the drawing dynamically on the form. When the user has made all of the changes and sees that it is exactly what he wants then he can then choose to apply the changes. This is different than just filling out a group of text boxes with a generic picture that may or may not represent what the use wanted. I don't know if this explains my concept. I have done this in the past with VB or C# as stand alone programs for engineers, but I have not tried this within Revit macros.

  4. #4
    Member
    Join Date
    2015-12
    Posts
    19
    Login to Give a bone
    0

    Default Re: Draw Lines on Revit Macro Forms

    Thanks for the explanation. It is very clear now. I believe you should be able to achieve the same thing in Revit Macro. Actually Revit Macro is using C# and VB but in SharpDevelop IDE, similar to Visual Studio IDE but its open source. Much like Visual Studio, it has the same User Forms and .Net Assemblies. While running Revit, do the following:
    1. Go to Manage ribbon menu and choose the "Macro Manager".
    2. Create a Module.
    3. Create a Macro within the module.
    4. Click Edit to open the SharpDevelop IDE and start editing.

    Since you're familiar with VB and C#, most likely in Visual Studio or similar, it should be an easy ride for you. It's easy to find help for SharpDevelop as well.

  5. #5
    Active Member
    Join Date
    2011-01
    Posts
    87
    Login to Give a bone
    0

    Default Re: Draw Lines on Revit Macro Forms

    Quote Originally Posted by rokane745721 View Post
    Is it possible to draw lines on a form within the Revit Macro? VB.net
    I presume you need some sort of dynamic drafting on a form, other wise you could use images and a picture box.
    Doing this in vb would be a lot more difficult as there is not much source code to work from vb in a control. I think I saw something on planetsourcecode.com recently about drawing lines in a picture box if you want dynamic. That's always my first source of code because it is very specific and rarely ventures far from that.
    You could slam a lot of images in a picture box and simply turn off the ones you don't want to be visible would be easiest.

Similar Threads

  1. Replies: 9
    Last Post: 2017-10-16, 04:27 PM
  2. Add Draw Order/Lines Merge/Lines Overwrite settings to layer properties
    By Wish List System in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2013-10-25, 01:57 AM
  3. I wish revit allowed you to draw lines less than a 1/32 of an inch
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2010-04-20, 04:12 PM
  4. Draw Grid Lines using Revit API in C#
    By shifali.a in forum Revit - API
    Replies: 9
    Last Post: 2009-05-11, 07:30 PM
  5. Create a macro to draw Polyline a certain width
    By Bear31831 in forum AutoCAD Customization
    Replies: 2
    Last Post: 2007-01-31, 05:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •