Search the Community
Showing results for tags 'formula'.
Found 4 results
field Convert dwgprops item to a float in field formula
MastroLube posted a topic in AutoCAD GeneralHi there! I have a lisp that saves a custom variable in my dwg. (the custom tab in dwgprops command) I want to insert that value in a field and manipulate it a little bit, but it's a string. Is it possible to convert it to a float inside the formula box in the field editor? I've tried with autolisp (atof ...) but it's not working. Thanks! Dennis
Formula on AutoCAD
Ahmad Arik posted a topic in AutoLISP, Visual LISP & DCLIs it possible or how to make formula equal (=) and sum in AutoCAD like we usually do on Ms. Excel? So, when I change text, the others text that I linked will change automatically. Thanks..
Spacing Pickets iLogic Formula Rules
kpyoung333 posted a topic in Autodesk InventorI searched but could not find a good answer so I thought I would give you all something fun to play with. I am trying to space a gate formula where the pickets and wood slats are computed based off the lengthening of the gate. I figured the formula and it seems to be what I need but now implementing it into Inventor is where I fail. The problem is if the gate gets too big it won't fill in the huge spaces on the sides. Attached is an image of what I'm trying to do and the formula I put together. This would save me time and headache of having to figure it out every time and make the model parametric. I typically work with iProperty forms to drive my model, but haven't had much need for Rules or iLogic or iParts. Usually just Vault copy design, scaling the door frame width & height then changing out components and adding detail works quickly and efficiently. With gates however, they are all long runs of pickets and spacing by Rules would be perfect. Thanks!
Add ATTDEF Value to Another ATTDEF Value
gnurob posted a topic in AutoCAD Drawing Management & OutputAutoCAD 2012 QUESTION: Is it possible to add the value of one ATTDEF to another ATTDEF where the second ATTDEF obtains one value from a BlockPlaceholder? E.g. A dynamic block width Parameter named "Width" = 300 ATTDEF1 named "Pocket" = 25 ATTDEF2 = BlockPlaceholder ("Width" selected) + ATTDEF1 ("Pocket" selected) ATTDEF2 = 325 BACKGROUND: This may seem a little convoluted, so let me explain the application. We currently use a dynamic block of a simple rectangle which is STRETCHed to fit the daylight opening of a curtain wall frame (those aluminum/glass walls on many commercial buildings). By inserting this block into every opening of a building it is possible to visually confirm a complete take off as well as verify all sizes are exact (and many many sizes are typical). Glass sizes, however, differ from the daylight opening. The pockets of the frame differ depending on the specific design: resulting in typically 16 mm, 19 mm , and 25 mm larger glass sizes. On the other hand, some frames use a fin retention and may result in glass sizes being 13 mm smaller, not larger. BEST WORKING SOLUTION: Create a dynamic block of a rectangle that has a "Width" and a "Height" Parameter Place a multi-line ATTDEF centered in the rectangle Insert a Formula in the default value of the ATTDEF Right-click in the Formula to add a BlockPlaceholder for "Width" Set units to decimal with 0 precision (forces Metric) and "+ 25" to Formula add new line, then "x", then another new line Right-click in the Formula to add a BlockPlaceholder for "Height" Set units to decimal with 0 precision (forces Metric) and "+ 25" to Formula As you can see, this results in a result like the following: 325 x 400 WHATS WRONG WITH BEST WORKING SOLUTION: Unfortunately it does not offer flexibility: Dynamic block permanently set to add a 25 mm pocket Requires multiple dynamic blocks for each frame type Forces all units to be Metric IMPROVEMENTS: GOOD: Ask user the pocket size (e.g. -13, 16, 19, or 25 mm) when inserting the block and use that value in the Formula field. BETTER: Allow user to select a pocket size from a list: e.g. Flush Glazed frame: 16 mm Curtain Wall frame: 25 mm Window frame: -13 mm ULTIMATE: BETTER + works in Metric and Imperial