Setting variable to components LenZ value?

Hey all, I need assistance setting at least a minimum, but scalable, value to the LenZ of a component (DC).

I currently have:

LenZ=IF(B=“24J”,242,IF(B=“27J”,272,IF(B=“30J”,302,IF(B=“36J”,362))))

This forces the height of the component relative to a dropdown selection and upon which it fixes to this height ie: it can’t be scaled. But I also have a “Custom Height” option (from dropdown), which is to allow the component to be scaled to size, currently if custom height is selected the component drops to zero. What do I need to add or setup to enable a minimum that will still allow for upward scaling?

Hi Richard

You can add formula to the value section of the drop down, so can reference a custom attribute, or the current value (making it possible to scale) or any specific value.

panel example.skp (27.2 KB)

best
Philip

1 Like

Philip, mate you are the absolute VERY best! Every single time I’ve asked any question, you are on it and with the ultimate solution! Massive kudos to you!!

BTW, do check your messages!

Is it just me or have Dynamic Components become more buggy over the latest releases?

DC’s that I created in 2018 now seem to misbehave and when I try to repair them I seem to be encountering even more programming and UI issues?

Frustrating as user created Live Components still seem a long way off and DC’s arguably not worth the effort.

All not certainly helped by my intermittent development of DC’s

Gary, mate I haven’t yet updated to the latest version as I always shite myself that something will be broken. And I think you’ve just confirmed that!

I’m feeling your pain!

Just updated to the latest latest version 21.1.332 and careful administrator install , see if that corrects the weird issues…eg

    • custom names not being able to be renamed … (say uppercase to lowercase letters…)
    • new components saving only only plan view
    • updated components when selected from the component tray immediately inserting themselves miles from the origin without any opportunity to drag to a position on screen (yet my older DC’s behave as traditionally expected)
    • updated components invisible after insertion…

Now, I know I am only a casual DC creator so these may be my user errors but I do not recall these
strange behaviours before

eg error changing custom name from uppercase to lowercase

  1. the attributes are not case sensitive, d1w same as D1w or D1W, trying to place more than one will throw an error. Can change D1W to D2W then D1w
    Capture

  2. If plan view, then check if

Capture2

however if the DC has a glue to face, then need to delete this first then saveas to a preferred 3D view then reinstate the glue face to stop the glue face having precedence.

3, Check not double wrapped, not geo-located
4, tabs(layers) ?

Basically guessing but can you PM or upload any DCs so can check on different versions?

1 Like

This is the SketchUp application version.

Often updating the application also comes with a newer version of the Dynamic Components extension (especially history has shown for major version application releases.)

Another thing that can help or hinder DC behavior is whether the Chromium framework was updated. This can affect how HTML renders and how JavaScript evaluates.

(FYI, your “Message from Webpage” dialog is showing a JavaScript error that one of the DC dialogs did not expect.)

As Phil explained, the names you see in the Component Attributes dialog are Labels. The actual attribute identifiers are all lowercase, so the JS code choked when it tried to handle 2 attributes that had the same identifiers.

Anyway, it is a good thing to update when problems are found.


FYI, you can update the Dynamic Components extension independent of the application via the Extensions Manager.

The latest released version for the Dynamic Components extension is: 1.8.1
It was released with the SketchUp 21.1.0 release.

(Prior to this DC v 1.8.0 released with SketchUp 21.0.0.)

1 Like

thx Dan, I have the latest extension 1.8.1

1 Like

not double wrapped, and not glue to face… might be geolocated though … thx

Yep, I geolocated by default in my templates so will disable that to see if it makes a difference… although not very helpful to have Boulder Colorado as my geolocation when I am in Danang, Vietnam :slight_smile:

Well , Geo location was certainly causing an issue with new or edited components I saved.

With geo-location enabled in my empty file

  1. I created a simple component box 1x1x2m high at the origin…
  2. Saved it as a component
  3. Went to the component browser and selected it .
  4. .It immediately got inserted [no sticky drag option given) a x=670,000, y= 0, z = 0
    (ps - it was so far from the origin I could not even see it when I zoomed selection)

I could insert by holding down the left button and drag to a desired position in my model but that was never my workflow in the past.

So I disabled geo-location in my base empty file and
now insertion happens as it has always happened before [eg component sticks to the cursor until located in the model – eg selecting the component in the browser tray does NOT immediately insert the component 600 kilometres from the origin

A BUG?

Higly unlikely :sweat_smile:, maybe a combo of bugs?:grinning:

You could try …
Open the component file directly and de-geo-locate it.
Use Aerilius’ Attribute Inspector to delete the “GeoLocation” Google Earth dictionary.
Then resave the component.

Now when inserted into a parent model it should not matter if the parent model is geo-located.
The “unlocated” component will not “know” where to be inserted so it will stick to the cursor.


If when saving out locally created components to a file, that they are inheriting the active model’s geo-location, then that would be a bug.

I just tried it in SU2021.1.332 and everything worked correct. It the test component did not inherit the working model’s geo-location. Inserting into a different geo-located model worked normally with the instance attached to the cursor.

Note that I started a new model before step 3 and geo-located it to a different location than the original working model where I created the test box component.


When things act goofy, it’s time to reboot the computer to clear out memory.

1 Like

Thanks Dan,

will try those suggestions , shutting down W110 is a pain for me as I have a unknown driver issue that forces a bluescreen loop every time I start upand W10 diagnostics can’t fix it