Hi Peer,
re:
> Are you up for providing something like an updated moi.idl and a list of all factories?
Eventually yes but not all right now. Since v4 with the transition to a cross platform code base MoI itself does not use any moi.idl file anymore unlike v3 and earlier. I can help you with specific areas though.
re: sceneBrowser
The base scene browser object is at moi.ui.sceneBrowser, it has read-only properties for
sceneBrowser.objects - root scene browser item for objects section
sceneBrowser.types - root scene browser item for types section
sceneBrowser.styles - root scene browser item for styles section
sceneBrowser.rootItems - list of all root scene browser items
re: sceneBrowser items,
item.name
item.expandable
item.expanded
item.parent
item.children
item.find( 'name' ); - recursive search for child item with given name
item.alterStatus( 'show', true ); - First arg one of 'show', 'hide', 'lock', 'unlock', default if not given is 'show'. Second arg = true for right click behavior.
item.select( 'toggle' ); - // One of 'toggle', 'select', 'deselect', 'filteron', 'filteroff'. Default if not given is 'toggle'.
re: DXF export,
moi.geometryDatabase.fileExport( 'FileName', 'options_string' );
DXF export function parameter options (semi-colon delimited):
NoUI=true
ExportType=2d | 3d
ProjectionView=top | 3d | front | right
WriteCurvesAs=splines | cubicsplines | polylines
PolylineAngleDegrees=10.0
UseSimpleEntities=true
NumDecimalPlaces=12
GenerateHiddenLines=false
HiddenLineLayerMode=fromstyle | custom
HiddenLineLayerName=Hidden lines (layer name to use when layer mode = custom)
HiddenLineLayerPrefixSuffix=prefix | suffix (controls dropdown for which of "prefix" or "suffix" inputs is shown in the UI)
HiddenLineLayerPrefix=prefix_ (prefix to prepend to style name when layer mode = fromstyle)
HiddenLineLayerSuffix=_suffix (suffix to append to style name when layer mode = fromstyle)
IgnoreTangentEdges=false
Resolution=25.0
re: SVG export
PDF/AI/SVG export function parameter options:
NoUI=true
ProjectionView=top | 3d | front | right
ScaleType=fit | preserveunits
MoiScale=1.0
PageScale=1.0
PageUnits=mm | cm | in | pt
CenterOnPage=true
PageSize=letter | legal | tabloid | a3 | a4 | a5 | custom
Landscape=false
PageSizeCustomWidth=8.5
PageSizeCustomHeight=11.0
PageSizeCustomUnits=mm | cm | in | pt
GenerateOutlines=true
GenerateSilhouettes=true
GenerateHiddenLines=false
GenerateCrossHatching=false
ShadedBackground=true
IgnoreTangentEdges=false
Resolution=25.0
Line style properties for visible lines:
VisWidth=0.1
VisColorMode=fromstyle | custom
VisColor=0,0,0 (r,g,b color value for lines when color mode = custom)
VisLayerMode=fromstyle | custom
VisLayerName=Visible lines (layer name to use when layer mode = custom)
VisLayerPrefixSuffix=prefix | suffix (which of prefix or suffix are shown in the UI when layer mode = fromstyle)
VisLayerPrefix= (prefix to prepend to the layer name when layer mode = fromstyle)
VisLayerSuffix= (suffix to append to layer name when layer mode = fromstyle)
Line style properties for outlines:
OutWidth=3.0
OutColorMode=fromstyle | custom
OutColor=0,0,0 (r,g,b color value for lines when color mode = custom)
OutLayerMode=fromstyle | custom
OutLayerName=Outlines (layer name to use when layer mode = custom)
OutLayerPrefixSuffix=prefix | suffix (which of prefix or suffix are shown in the UI when layer mode = fromstyle)
OutLayerPrefix= (prefix to prepend to the layer name when layer mode = fromstyle)
OutLayerSuffix= (suffix to append to layer name when layer mode = fromstyle)
Line style properties for silhouettes:
SilWidth=0.4
SilColorMode=fromstyle | custom
SilColor=0,0,0 (r,g,b color value for lines when color mode = custom)
SilLayerMode=fromstyle | custom
SilLayerName=Silhouettes (layer name to use when layer mode = custom)
SilLayerPrefixSuffix=prefix | suffix (which of prefix or suffix are shown in the UI when layer mode = fromstyle)
SilLayerPrefix= (prefix to prepend to the layer name when layer mode = fromstyle)
SilLayerSuffix= (suffix to append to layer name when layer mode = fromstyle)
Line style properties for hidden lines:
HidWidth=0.1
HidColorMode=fromstyle | custom
HidColor=0,0,0 (r,g,b color value for lines when color mode = custom)
HidLayerMode=fromstyle | custom
HidLayerName=Hidden lines (layer name to use when layer mode = custom)
HidLayerPrefixSuffix=prefix | suffix (which of prefix or suffix are shown in the UI when layer mode = fromstyle)
HidLayerPrefix= (prefix to prepend to the layer name when layer mode = fromstyle)
HidLayerSuffix= (suffix to append to layer name when layer mode = fromstyle)
Line style properties for annotations:
AnnWidth=0.1
AnnColorMode=fromstyle | custom
AnnColor=0,0,0 (r,g,b color value for lines when color mode = custom)
AnnLayerMode=fromstyle | custom
AnnLayerName=Annotations (layer name to use when layer mode = custom)
AnnLayerPrefixSuffix=prefix | suffix (which of prefix or suffix are shown in the UI when layer mode = fromstyle)
AnnLayerPrefix= (prefix to prepend to the layer name when layer mode = fromstyle)
AnnLayerSuffix= (suffix to append to layer name when layer mode = fromstyle)
HiddenLinesOpacity=0.75 (opacity only applies to PDF export, not AI export)
HiddenLinesDashed=true
HiddenLinesDashSize=0.75
HiddenLinesGapSize=1.0
UseAICB=true (for AI copy to clipboard on OSX, for going into Adobe Illustrator CS3 or older).
re: getDirs,
moi.filesystem.getDirs( 'dirname', 'filter*' );
Given a directory name and an optional filter string, return a list of sub-directories within that directory.
For example: var dirs = moi.filesystem.getDirs( 'c:\\', 'p*' );
Filter can be a semi-colon delimited list of filters.
re: UpdateViewTab,
Update view tabs customization
Call a function UpdateViewTab( TabButton ) in the UI when a view tab has been reversed, so that it is possible to implement custom UI like having images there instead of text. Requested on the forum by Tim Whiteman here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=9821.1
re: annotation objects,
annotation.annotationType - one of "LinearDimension", "RadialDimension", "AngularDimension", "Leader", "Text"
annotation.annotationFrame - coordinate frame for the annotation object's plane
annotation.arrowheadType - "arrow", "open arrow", "tick", "dot", "barb"
annotation.arrowLength - pixel arrowhead size when using Scaling: By screen size mode.
annotation.arrowLengthModelUnits - model units arrowhead size when using Scaling: By model units mode.
annotation.arrowWidthFactor - value for aspect ratio to generate width from height
annotation.arrowGap - gap at point of arrow in Scaling by screen size mode
annotation.arrowGapModelUnits - gap at point of arrow in scaling by model units mode
annotation.openArrowLength - length for open arrowhead size in By screen size mode
annotation.openArrowLengthModelUnits - length for open arrowhead in model units mode
annotation.openArrowWidthFactor - same as arrowWidthFactor but for Open arrowheads
annotation.tickLength - size of tick type arrowhead in by screen size mode
annotation.tickLengthModelUnits - size of tick type arrowhead in by model units mode
annotation.tickLineWidth - display line width for tick arrowheads
annotation.reverseTick - reverse tick direction
annotation.dotSize - size of dot arrowhead type in screen size scaling mode
annotation.dotSizeModelUnits - size of dot arrowhead in by model units scaling mode
annotation.extensionLength - length of extension lines in screen size scaling mode
annotation.extensionLengthModelUnits - length of extension lines in model units scaling mode
annotation.extensionGap - gap for extension lines in screen mode
annotation.extensionGapModelUnits - gap for extension lines in model units mode
annotation.arrowLineExtension - arrow line extension in screen mode
annotation.arrowLineExtensionModelUnits - arrow line extensoin in model units mode.
annotation.textAlign - "Left", "Center", "Right", "Justified"
annotation.scaleMode - "By screen size", "By model units"
annotation.height - Text height for By model units mode.
annotation.textBoxPaddingX - left/right text box padding for screen size scaling mode
annotation.textBoxPaddingY - top/bottom text box padding for screen size scaling mode
annotation.textBoxPaddingXModelUnits - left/right text box padding for model units scaling mode
annotation.textBoxPaddingYModelUnits - top/bottom text box padding for model units scaling mode
annotation.textBoxOutline - "None", "Rect", "Bracket"
annotation.textBoxOutlineWidth - width to use for bracket outline in screen size scaling mode
annotation.textBoxOutlineWidthModelUnits - width to use for bracket outline in model units scaling mode
annotation.textMode - "Above", "Inline", "Screen"
annotation.text - text value for annotation, for dims it can contain <> which will be replaced by numeric dimension length
annotation.fontName
annotation.fontPtSize
annotation.fontStyleName
annotation.fontWeight
annotation.fontStyle
annotation.fontUnderline
annotation.fontStrikeout
annotation.distanceDisplay - "Decimal", "Feet & Inches"
annotation.numDecimalPlaces );
annotation.showTrailingZeros
annotation.fractionalDisplayPrecision
annotation.rotateArrowheadPlaneTowardsViewer
re: and SaveAs
moi.geometryDatabase.saveAs( 'FileName', 'OptionsString' );
- Michael