Layout Ruby API

layoutapi

#1

Breaking this into a new topic to keep from getting off topic.

The Layout Ruby API is only available in Layout 2018. The SketchUp model in shown on the Layout page can be accessed from the Layout API. However ‘nothing’ can be done with the SketchUp model.

By nothing I mean that the SketchUp entities can’t be referenced (dynamic components, etc.)

I also haven’t figured out how to attach layout dimension leaders to a point in the model using the API.
For example if I dimension the width of a building in layout, the dimension moves with the model and stays connected. Perhaps this is still not possible using the API? @thomthom

I couldn’t see any way to get Dynamic Component info in Layout. Can you elaborate?


Layout 2018 - not up to par with other drafting software
#2

It is in the label tool and since version 2018, you can ‘see’ the advanced attributes as well:


#3

Neat! I’ll have to try that.
It doesn’t seem like that info can be accessed from the API though?


#4

yes it can, but for now, only in SketchUp, the library is called dynamic_components


#5

Incorrect. It is available (at this time) only within SketchUp 2018.

To manipulate the model, you may need to load it into SketchUp. To update in the LayOut document, you may need to save the it’s bounds etc. and recreate it again, after having saved the modified SKP file.

Read example given for class …


#6

I was mistaken the Layout API is accessible only from within SketchUp.

OK my problem was I was looking at the Layout::LinearDimension.start_connection_point which only accepts a 2D point. Specifying a ConnectionPoint will generate an error.

Error: Cannot convert argument to Geom::Point2d

I did find that a Layout::ConnectionPoint can be provided to the Layout::LinearDimension.connect method though.

That is what I was looking for.


#7

Really? This is news to me. How does one access it?


#8

we shouldn’t talk about fight club…

john


#10

Hmm… I must have been dreaming. Too much coffee (or not enough)!


#11

Yup, as shown in the example I linked for ya’. It is a bit weird. You first draw it as a 2D paperspace object, then “connect” it to the 3D modelspace.


#12

Is there a discussion somewhere about LayOut ruby script(s) that can complement and/or supplement the capabilities of the Medeek BIM extensions?


#13

Right here. You’ve found it (or it was grafted here to it by admins.)


#14

For about a year, I have considered using the ConDoc Tools. But, it seems like this extension is better geared for AIA Architectural Graphic Standards. I am not an architect nor do I work for an architectural firm, so AIA standards are most likely beyond what I need.
Next week, I have a meeting with the drafting instructor at the local community college to discuss ANSI and ISO drafting standards for construction documents. Info online about ANSI drafting standards only covers mechanical drafting.

Added context: I have been learning the Medeek plugins for only a few months now.

(Disclaimer: I am hesitate in utilizing forums because I am NOT a strong reading.)


ConDoc Tools - general discussion
#15

I am new to this forum; I started my account yesterday. Admins have moved one of my posts, but I was able to place my question above within the correct thread from the start.


#16

ANSI is defunct (I believe.) Any of the old standards sill in use have been adopted by other professional associations.

For example, ANSI Y14.100 (replaced MIL-STD-100) and is now
ASME Y14.100 having been updated as late as 2004 …

https://www.asme.org/products/codes-standards/y14100-2017-engineering-drawing-practices

The ASME adopted most of the old Y14 series of standards from ANSI. So you’ll have better luck searching using "ASME Y14.{number}" than "ANSI Y14.{number}".

You might find free PDF editions available through collegiate online libraries. For example here is one …


For Architectural try …

https://www.nationalcadstandard.org/

https://www.iso.org/ics/01.100.30/x/

… and another starting point …


ConDoc Tools - general discussion
#17

Dan, thank you for the info and links!!

The local drafting instructor only has outdated AIA books. He has lent me his 1989 AIA Architectural Graphic Standards Student Edition book. He does have a 2000 regular edition, but I am thinking that the student edition would be better for me.


#18

ANSI/ASME paper sizes vs ARCH paper sizes. (ARCH sizes from AIA?) A construction company should use ARCH paper sizes for construction document drawings?
(Please move this comment to the appropriate thread if need be.)