One should divide the dialog forms into purpose and place 2 to 3 or less per a page, then use auto hide if you want extra space
Posts made by pcmoor
-
RE: Question about 2017
-
RE: Logic Function HELP!!
if using in the context of lenz attribute and assuming using cm, then value compare current("lenz")*2.54
lenz = if(current("lenz")*2.54<=240,240,if(current("lenz")*2.54<=270,270,if(current("lenz")*2.54<=300,300,360)))
if calculating a nearest_size attribute without forcing the lenz to snap to the result, then use
size = if(lenz<=240,240,if(lenz<=270,270,if(lenz<=300,300,360)))
-
RE: How to do repetitive stitching holes .
probably the quickest way without using extensions is to draw a circle on a 2D shape then place a circle, then copy array (move tool + control), delete the centers. Then push pull the thickness of the belt
Another method is to use a dynamic component on the 3D form
https://3dwarehouse.sketchup.com/model/25c4463957ad36c2635f69bba8c8ac7/dynamic-hole-builderBut since is just a belt with say six holes then easy enough to copy array the first circle on the raw then pushpull the holes individually
-
RE: Edge Length Attribute
here is a panel DC within a working file that can be scaled or fixed and set to different pitches and returns the dimensions in the option dialog
Use the fixed position (drop down option) to start with, then use the scale position to match the next panel (direction via another dropdown)
(its not fully tested, so if there's something not quite right...its fixable)
I can help you if you private message your DCwith regards the work flow, the report writer can transfer the required data to excel. Excel can hold the formatted label, exactly as you have shown with named cells in the data positions. An VBA routine can be made to transfer the data sheet from Sketchup to the labels required, in that Copies be made in excel and filled out to suit each component that exists on the report
I am well acquainted with excel and VBA
P.S. most likely would build this DC differently, however it does give you an idea to how to achieve your goal
-
RE: Edge Length Attribute
I would say its possible, would the panels have side cutouts for openings?
-
RE: Sketchup DC Material attribute
Creating a string works
=(RANDBETWEEN(111,223) & "," & RANDBETWEEN(111,223) & "," & RANDBETWEEN(111,223))
-
RE: Help - facearea
refer to
http://sketchucation.com/forums/viewtopic.php?f=289%26amp;t=68004otherwise if specific you need to upload your component (private if required, note I will be away two days)
-
RE: Sub-component to copy equidistant along main component
this is a slight modification where one can choose the maximum rail position
-
RE: Sub-component to copy equidistant along main component
hi
when using copies, the DC creates a number of copies each with a notation copy which is sequential.
So if there are four copies, then copies will be produced with an attribute called Copy with a value 1...up to 4one uses this copy attribute to identify and manipulate each copy
the first idea is generally create equal sized copies and have them space themselves evenly. Assuming the first copy is the top rail, then its location would be the height of the door minus the width of the rail
=DoorPanel!LenZ-LenZ
if I times this by copy
=copy*(DoorPanel!LenZ-LenZ)then if copy=0, this expression =0, which is true for the original.
if copy =1, the expresion = DoorPanel!LenZ-LenZ. the position of the top railnow I introduced a attribute option for the number of rails (including the first)
now copies of DoorRail will be =DoorPanel!number_rails-1
now their position will be divided by one less than the number of posts as per a fence construction, that is the same as the copies value
so for the position
=copy*(DoorPanel!LenZ-LenZ)/Copieshence the solution as attached
one could add conditional statements as well to create variances via optional input for intermediate mullions, or different panel sizes, will help if you require and you explain any detailing
-
RE: Change length of rectangle frame without change its thicknes
Method 3
somewhat follows the line of reasoning of method 2create rectangle 900x50 and pushpull it 100mm, make it a group "middle"
create 45deg wedges either end, groups "bottom mitre", "top mitre"make it a group called "side" and create the relationship / formulas, again I used parent as I intend to copy and make unique sides
now hide the joining geometry and group, this then in formation should be similar to the side in method 2, but mitered rather than over lap
do the rotate @ 500mm as before, copy(control) *3
change the group instance name in both model info and the attribute dialog
it is important to confirm that the groups are unique (changing the instance name or position may not create separate definitions (the copies initially share the same definition, that relationship needs to be broken) so pair each one and right click make unique
now make all the unique sides a component, "frame3"
fill in the relational formulas
completed example attached
-
RE: Change length of rectangle frame without change its thicknes
method 2
create one side of the frame, that is the thickness, depth and the length
that is 1000 x 50 rectangle pushpull 100mm to match side of the first example
make this a group, named "side"now draw a reference line from the center of the group, 500mm long (half of its length) then select the "side" group and use the rotate tool centered on the end of this line, press control, and copy rotate it 90degs then enter *3 to copy rotate to form the full frame
this creates groups on the boundary of the component bounding box, with their axis pointing inwards
Now delete the line, select all the sides and make them a component "frame2"
open the attribute dialog and add an attribute "thick" and expose this to the option dialog, enter 50mm (5cm) as value
expose the size attributes of the frame and label them as you like
in the LenX attribute of the "side" groups write then copy
=parent!thick
(note: parent is a general term for the parent group or component and can be used instead of the name, this is good for copies and common formula)This component will now change as per options or scaling, to remove the lap of the groups, after a change one uses outershell on the groups
So open the frame2 component, select the groups and make them a component "outershell and explode me", create an attribute "thick" and write or copy
=parent!thick
(initially you will see the red # in the side groups, but this will go once the above formula is entered in thick)
you will now have a point to use the right click menu within the outliner to simplify the DC (dynamic component).
However this destroys the dynamic part. There is a way a DC can be reinstated via a swap with a saved file of the DC. To enable the DC to match the existing attributes we need to add "current" formulas, the current function returns the last set value in inches, so for metric one converts this to centimeters by multiplying by 2.54=current("LenX")*2.54
=current("Leny")*2.54
=current("Lenz")*2.54
for the size attributes
then in the outershell component make the size attributes equal to the frame2 component
Now this DC must be saved (via right click menu) as a component file (folder of your choice) as changing the values via the option dialog will overwrite the current formula, this does not mater as the swapping DC to replace the simplified version still has.have attached the working file, the DC should be right saved before changing the options for the swapping DC
-
RE: Change length of rectangle frame without change its thicknes
Method 1:
first work with a know volume, draw a rectangle 2000mm x 1000mm and pushpull a thickness of 100mm make it a component call it frame,
open the component and offset a face 50mm for a known frame thickness, make this a group, name it "front cut", open this group and pushpull it 100mm. Then delete the front and back faces, (reverse the rim faces) close this group.
then whilst still within the open component, "frame" draw (trace) a matching rectangle on the back surface, select this and make it a group called "back cut", open this and delete its face.
You should now have a frame that is 50mm wide and 100mm deep with and overall size of 2m x 1m
open the attribute dialog and open the position and size attribute groups of the frame component and its two embedded groups front cut and back cut
the greyed out values should be familiar with the known dimensions of the object created, the next stage is to create formula in regards to the relationship of the geometry, its important that the results match these grey values, otherwise you will create scaling issues that will come back to haunt you later.
open the option dialog.
create an attribute in the frame for the thickness, if you using metric, its important to select centimeters
set this to 50mm (5cm)
you will note that X,Y in the "front cut" group is 5cm, this the same as the thickness (you will start to see the reason to start with known and unique dimensions for your base geometry), you can click these values in after an equals sign, by selecting the cell as one does in excel or any other spread sheet program
in the "back cut', Y matches, but X is 195, that is because its axis is in the other direction, for this case we will leave it alone, although you can change it if you want. So its value is the outside lenX of the frame minus the thickness
so one works out the rest
-
RE: DC multiple different OnClick movements
this is probably the clearest and most simple, rather than use a load of conditional statements
source: Jack de Moel
https://forums.sketchup.com/t/multiple-dynamic-components-w-n-a-dynamic-component/48035/6
I made a cube as required based on his technique
-
RE: Redraw Multiple Items
perhaps you could make your own?
a ruby snippet: either use ent or sel
test in the ruby console` mod = Sketchup.active_model # Open model
ent = mod.entities # All entities in model
sel = mod.selection # Current selectiondcs = $dc_observers.get_latest_class
ent.each { |e|
if e.is_a? Sketchup::ComponentInstance
dcs.redraw_with_undo(e)
end}` -
RE: Area Reporting by Components
Because you are altering the raw geometry rather than using a formula to do this (which would be too involved and impractical, I suggest either place an attribute that can be changed via onClick or the option dialog to cause the redraw.
I added redraw to the onClick, this means you have to select the interact finger to do the redraw after..a few too many clicks
If the Dynamic Component is further developed and the option dialog had too be used then this will automate the redraw after pressing applyAnother alternative, and probably the quickest (safest) is to create a shortcut key, and press it after closing the component (click any outer space) with it still selected
- select one of the components (necessary to show the right click options in the shortcut menu)
2.from the top menu go to: window / preferences / shortcuts
3.select Edit/Item/Dynamic Components/Redraw in the dropdown menu and assign a letter like U or N that have not be assigned
Then after altering the shape, close and press u
I took the liberty of changing the attribute label to data (changed by double click on bedroom label) then use the name attribute, copy the new component name here
-
RE: Component ordering
can you upload an example? and some more explanation so one can determine how you are using layers, groups, scenes
-
RE: Mother child
all onclick functions should on the same level of nesting otherwise the top will work in preference to the lower as its triggered first and shields the rest.
Combine two or more actions using semicolon between onclick functions, or use a common variablecheers
philipPS
had to fix the height reference to stop the overall shrinking to change in the bounding box as toe is withdrawn
change group to component as can not reference a group back to the parentthe base is the trigger for the slide
-
RE: Search a DC attribute string value
More or less correct. As you know find returns a position but that is -1 (an error) if there is no instance of the required text. So adding the text you are trying to find to the end of the original string, then if there is no other instance, then position return will not be -1 but the length of the original string plus one,
So the difference between (position-len(original string)) returns a negative number if another instance is found, which if<0 will return trueadded the above example with extra attributes to show steps clearer. but better to use one liners to save space in your DC dialog, once understood
-
RE: Search a DC attribute string value
Add the required text to the end of the string then use "find", then compare the length of the original string and position returned by find. By adding your text to the end, find will always return a value