3 Replies Latest reply on Mar 20, 2015 10:12 AM by Jeff Mirisola

    Generate part based on dimensions input into pop up box.

    Tiana Rosser

      Hi All,

       

      I don't have any experience with programming so could someone produce the code for the below scenario please.

       

      I would like a code to open a input box asking for the dimensions of a part when a general part is inserted in an assembly.

       

      Eg; If I insert a cylinder, I would like the box to ask for the height and diameter. Then generate the component.

       

      Cheers

        • Re: Generate part based on dimensions input into pop up box.
          Bruce Perry

          Tiana:

          What your asking for isn't as simple as you describe it. First of all you want to create a part in an assembly. Or perhaps bring in a part to an assembly. Either way it requires you to create a part. Then what do you do with it? Save it to the assembly? Save it separate?

           

          Either way it is much more complected that just adding a part with input dimension. It can be done You have three parts to figure out.

          1. How to make a part with input dimensions, 2. How to insert a part into an assembly, and 3. What to do with it once it's there? What do yo call it. where do you save it.

            • Re: Generate part based on dimensions input into pop up box.
              Tiana Rosser

              I would like to bring in an existing part into an open assembly.

              I have a default part made (eg: Square or cylinder) and when I insert the part using macros I would like it to ask for dimensions. I wont overwrite the existing default part. It would be saved in the assembly as well.

               

              Once its in the assembly, it will be used to make the assembly. Its exactly the same as inserting a part with known dimensions. Instead of making each part individually then saving them and then inserting them, it will all be done in the assembly.

              I would call it a name based on its dimensions and the default component type. Eg: Cylinder 200mm Long

              I would save all components of the assembly in a components folder.

               

              Does this help clarify things?