// insert the usual references
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
using (Transaction tr = db.TransactionManager.StartTransaction())
{A method to create a rotated dimension using the AutoCAD .net API
protected void drawDimensions(Point3d dimensionPoint, Point3d point1, Point3d point2, double rotation)
{
using (Transaction tr = db.TransactionManager.StartTransaction())
{
BlockTable blockTable = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
BlockTableRecord modelSpace = tr.GetObject(blockTable[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;Sometimes you will want to query an object's properties - that you found in a drawing. How do you do that?
Let us suppose we have a single part. Then we need to:
- Get the Drawing
- Get the part identifier
- Select it in the model
SinglePartDrawing singlePartDrawing = (SinglePartDrawing)drawing;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function onSubmit(e) { | |
| // some work is done here: | |
| // var form = FormApp.getActiveForm(); | |
| // var allResponses = form.getResponses(); | |
| // var latestResponse = allResponses[allResponses.length - 1]; | |
| // var response = latestResponse.getItemResponses(); | |
| // var payload = {}; | |
| // for (var i = 0; i < response.length; i++) { | |
| // var question = response[i].getItem().getTitle(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://benkoshy.github.io/2024/12/09/then-ruby-keyword.html | |
| # this is a contrived example | |
| # experiment with it in an IRB console. | |
| # we want to: | |
| # take a string | |
| # add convert it to an int | |
| # add 1 to that | |
| # and then cube it |
Things which could be improved:
- Move away from API docs and Extras "docs" as separate pages ----> makes things harder to find and needlessly complicated.
- Improve "discoverability" problem. i.e. for example - to help readers answer the question: "which extras do I need, and why?" I feel I can improve upon this currently.
The rest:
- The rest of the docs seem pretty good. We have config options for advanced use cases.
Questions:
References:
- StackOverflow question
- Fibonacci Wikipedia
- Test it out in the go playground
package main
import "fmt"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| eval "$(wget -qO- https://gist.githubusercontent.com/benkoshy/f55d669ab8f8abcb9d131a940a782e1f/raw/1437cbd269547773c0bf5be4356b83d14a078fbb/omakub-2-boot.sh)" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo "hello world" |
NewerOlder