![]() Note that in scripts, Placement.Base is used to denote the Position component of a placement. Position = (x,y,z) is a Vector describing the point from which the object's geometry will be calculated (in effect, a "local origin" for the object). For example, in the y=x case (0.71,0.71,0) the value contained in the Axial spinbox gets applied in equal measure to the X and Y directions, but no movement happens in the Z direction. (One way to envision axial motion is to think of an airplane with a propeller spinning on its nose - the propeller spins about an axis of rotation while the plane moves along that same axis.) The values in the vector can be thought of as the relative amount of motion that will be applied in that direction. Note that it is also possible to translate (move) an object along this axis of rotation (axial motion) by entering the distance to move in the Axial: 0.0mm spinbox and clicking Apply axial. Entered as degrees, but stored internally as radians.Īxis = (ax,ay,az) is a vector describing an axis of rotation (See Note about axis of rotation). The first form of Placement fixes an object's location in space with a Position, and describes its orientation as a single rotation about an axis.Īngle = r is a scalar indicating the amount of rotation of the object about Axis. Similarly, if a rotation axis of (1,1,1) is specified, it may be normalized when stored in the quaternion and appear as (0.58, 0.58, 0.58) when browsing the object later. While there are several forms to specify a rotation, for instance with a rotation center, this is only used to affect the rotation computation and is not stored for later operations. "underscore or contain any invalid characters.The placement is stored internally as a position and a rotation (rotation axis and angle transformed into a quaternion). "Remember, aliases cannot begin with a numeral or an " + "in spreadsheet " + spreadsheet.FullName + "." + "Unable to set alias " + alias + " at cell " + nextCell + "No spreadsheet selected.\nPlease select a spreadsheet in the tree view.")įor selectedCell in ().selectedCells():Ĭontents = spreadsheet.getContents(selectedCell) Text = text.replace(character,REPLACEMENTS.get(character)) # support for custom aliases between parentheses ![]() :returns: a string containing the cell's coordinates in A1 notation.Ĭolumn_label = chr(mod + MAGIC_NUMBER) + column_label :param col: The column of the cell to be converted. :param row: The row of the cell to be converted. """Translates a row and column cell address to A1 notation. Both indexed from 1 (one).įor i, c in enumerate(reversed(column_label)):Ĭolumn += (ord(c) - MAGIC_NUMBER) * (26**i) :returns: a tuple containing `row` and `column` numbers. :param str label: A cell label in A1 notation, e.g. """Translates a cell's address in A1 notation to a tuple of integers. # The original implementatin of a1_to_rowcol and rowcol_to_a1 can be found here: If linkedObject.TypeId = 'Spreadsheet::Sheet': LinkedObject = selectedObject.LinkedObject If selectedObject.TypeId = 'Spreadsheet::Sheet':Įlif selectedObject.TypeId = "App::Link": :returns: a set of selected spreadsheets in the active document or None if none is selectedįor selectedObject in (): Returns a set of selected spreadsheets in the active document or None if none is selected. The traditional way to set this up would be:ĬELL_ADDR_RE = re.compile(r"(+)(\d*)")ĬUSTOM_ALIAS_RE = re.compile(r".*\((.*)\)") As an example, suppose you wish to have the following:Ī1: content = 'radius', B1: content = '5', alias = 'radius'Ī2: content = 'height', B1: content = '15', alias = 'height' This macro can be used to easily create aliases based on the contents of selected spreadsheetĬells in the previous column. Macro_EasyAlias.FCMacro # -*- coding: utf-8 -*. Adjacent cells in the next column will now contain aliases made from the text values from the highlighted cells.ĮasyAlias screenshot1, Text labels from Column A are used to create the aliases in Column B. Highlight the cells containing the text labels and run the macro. For example, "Height of top end (topHeight)" as the label (without the quotes) would make the alias of topHeight in the next column. ![]() Since version 2022.03.21 if you include text inside parentheses only that text will be the alias. For example, the text labels in Column A can be used to create aliases for the cells in Column B. It takes the text labels you will have already created in one column and uses those labels as aliases in the next column. Use this to quickly and easily create aliases for cells in your spreadsheets. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |