New to DC: topic for my simple questions to the pros

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Wed Sep 11, 2019 11:47 am

Hi again! I want to have to possibility to have the Definition Name of a DC to be displayed in the Options Dialog, so that if I rename a DC I have its correct name on the dialog. Is that possible?
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pcmoor » Wed Sep 11, 2019 12:27 pm

The components instance name is already tied to both the attribute and option dialog, this can be updated on the fly. This works if you do not use the name attribute and only after loading the component.
Otherwise the component definition name can be accessed via a ruby script and placed into an attribute value.
0

pcmoor 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Wed Sep 11, 2019 2:30 pm

Thanks! And what would this ruby script be?
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pcmoor » Wed Sep 11, 2019 11:09 pm

see the link to topic

viewtopic.php?f=289&t=71346
1

pcmoor 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Fri Sep 13, 2019 9:31 am

thanks Moor!
Sorry, but maybe I misexplained what I need, I'm attaching an example.

In this case I'd like that if I rename the component to whatever else, I get the new name in the Option dialog title. At the moment, this wont' happen: it keeps titling "elemento da prelevare_shell".
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pcmoor » Fri Sep 13, 2019 1:11 pm

you can use the component instance name to give each instance an unique name which is reflected in all the dialog, which is the natural inbuilt way

Capture.jpg



otherwise set
Name = _name
in the DC then
use a button from the toolbar extension to fire the code snippet to alter the _name attribute, which reads the current definition name, updates the original name to update the option dialog

Capture2.JPG
1

pcmoor 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Fri Sep 13, 2019 1:31 pm

Sorry Moor, I don't understand. In the file I sent you, if I change the Instance name of "elemento da prelevare_shell" NOTHNG CHANGES in any window...
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pcmoor » Fri Sep 13, 2019 1:52 pm

saveas the DC to a folder then bring it into another file, for some reason it does not initially work within its created file, after that, should work, regardless of the number of changes, the references are still maintained
0

pcmoor 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Fri Sep 13, 2019 1:54 pm

OH BIG THANKS! I WAS MISSING THE FACT THAT IT DOESN'T WOTK ON THE ORIGINAL FILE!
1

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Fri Sep 20, 2019 11:20 am

Hi again! is there a way I can LOCK the rotation of a DC along specific axis'?
I have a panel which I don't want users to be able to use as ceiling, so I only want it to be rotateable along its blue axis
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Wed Apr 01, 2020 5:39 pm

It's me again!

I'm struggling since a couple days about one thing I think should be doable but I can't get in any way
to work in my DC.

Basically I have a wall, made of two side pillars and a series of panels in the middle. My wall can be stretched to match some precise measures, which I set. The measures are exact multiples of the panels but may also admit an half-panel on the end, if needed.

When I stretch the wall, the start pillar must stay still (works now), the end pillar must reach the final point (works now) and in the middle I want the panel to copy a number of times. It works when I fix the length of the panels to a value, but I'm not able to tell SketchUp that it must stretch the last panel to half its dimension if needed.

Do you guys know a way to do that? Thanks in advance!!!
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pcmoor » Thu Apr 02, 2020 12:52 am

Hi

To work out the number divide the opening by the whole door size and convert to integer
To get the remainder take this number times the size from opening

For door lenx, use condition if remainder then the last copy (= copies) is to be remainder

There were some issues with the geometry and scaling, first applied lenX to two faces, then had to make a group of the edges so that it obeyed the formula rather than its natural scale

made outline to size to opening, added some copy function to the support
0

pcmoor 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Thu Apr 02, 2020 7:39 am

Thanks a lot pc!!! I'll have a look at it immediately!

*EDIT*
Everything is clear, I don't understand the syntax of these two formulas though:

=parete Arty!d_mod_num-1 +if(parete Arty!remain,1,0)
Here I don't understand the space between "-1" and "+if" and I don't know the meaning of the "parete Arty!remain" without any checks to perform.



=if(and(parete Arty!remain,copy=copies),parete Arty!remain,98)
Here I don't understand the meaning of "parete Arty!remain" without any checks: what will it solve into?

MANY MANY THANKS!
1

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pcmoor » Thu Apr 02, 2020 8:55 am

The condition is either true or false, 0 or any negative number is read as false whereas any positive number is true.
A bit of a short cut in logic.

The space is not required for mathematical functions, just there for my own readability
0

pcmoor 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Thu Apr 09, 2020 2:19 pm

I have a new question for the community: I have an attribute which ALWAYS include alternatively the words "OPACO" "LUCIDO" or "SEMILUCIDO" (name of the material applied). The words are always at the end of the text string, but the number of digits before may change.

I want another attribute to report ONLY the occuring word from case to case.

EG: my material attribute returns "grey RAL7040 OPACO", I want another attribute to report only "OPACO".

Is there a way to do this?
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby kostiaarh » Thu Apr 09, 2020 9:03 pm

pibuz wrote:I have a new question for the community: I have an attribute which ALWAYS include alternatively the words "OPACO" "LUCIDO" or "SEMILUCIDO" (name of the material applied). The words are always at the end of the text string, but the number of digits before may change.

I want another attribute to report ONLY the occuring word from case to case.

EG: my material attribute returns "grey RAL7040 OPACO", I want another attribute to report only "OPACO".

Is there a way to do this?


try so: =RIGHT(Material, 5)
0

kostiaarh 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Thu Apr 09, 2020 9:09 pm

Thanks Kostiaarh!

Sadly this formula returns always the last 5 characters, while the number of letters I have to report varies from 5, 6 and 10 digits.
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pcmoor » Thu Apr 09, 2020 11:21 pm

You can use find with the item to be found included in the text to avoid the error , and test if the result is within the length of the original text

Note that semi is placed before in the conditional statements otherwise will not be selected
0

pcmoor 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Fri Apr 10, 2020 4:40 pm

wonderful! Thanks!!
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Wed Sep 16, 2020 7:58 am

hi guys! I have a new question: I have a DC which features a choice between type1 and type2. I'd like to have an hyperlink to a pdf showing the technical specs of each choice, so I uploaded both pdfs to an S3 amazon server to have get a valid url.

Is there a way I can insert the <a href> tag inside a formula, so that the hyperlink changes based on the type1/type2 choice?
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pcmoor » Wed Sep 16, 2020 12:26 pm

I am using 2018. however can see problem when referencing in a formula, a suggestion is to put the pages in the value section of the options list
1

pcmoor 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Wed Sep 16, 2020 1:43 pm

As always, thanks a lot!
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Mon Nov 02, 2020 4:23 pm

Hi all you DCs experts!
I have one silly question: for several reasons, the most complex DCs I have made make themselves unique after a simple copy of the original instance. Given the fact that I have to further investigate why this happens in specific cases, would it be possible to write a plugin which searches all the instances of the same DC and substitutes the identical copies with one single component?
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pcmoor » Tue Nov 03, 2020 10:43 am

Any DC with nested DC(s) will become unique on a redraw, so I recommend using the definition name as a category rather than an identity, and use the instance name or a custom attribute as the identity. the #number is not considered, the reports "group by" is the instance or custom attribute.

If you simplify a DC so its nested components are not dynamic, then the definition #number will remain, so one could consider a method of simplification via a script as a possible solution depending on the DCs concerned.

Although you could script a swap for same, that "same" would have to be a simple DC with no nested DCs as the uniqueness would only be triggered again if there is a redraw
0

pcmoor 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Tue Nov 03, 2020 11:04 am

thanks Phil! Completely understood! Thank you!
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Wed Nov 11, 2020 9:08 am

Sorry to bother again...
I have another tricky question: I have issues trying to report attributes assigned to COPIES of the original instance. I mean: the fields areactually correclty compiled but the native reporting tool keeps only the result of the "original" instance.

I attach my component (which I'm particularly proud of, maybe naively...).

You can spot the issue, for example, if you change the size of the main component eg to 150x100cm. In this case I replicate the inner "Riser_strutt.quadrotta", and the copy is resized to 100x50. If you now enter the component you will see that the copy of the original instance has a "COMP_FIN" attribute changed to 50x100 (dimensions of the tile after the copy).
If I generate report using the "8_PRELIEVO" template, I get a quantity of 2 on the string of "quadrotta truciolare Riser", and the "comp_fin" field still reports "100x100".

Is there a way I can make this work? or is it impossible?
In this second case, my solution would be NOT to modify the copy of the original instance but instead include an invisible pre-set 100x50 component, appearing in the right places(s) when needed... Could this work?

THANKS A LOT IN ADVANCE!
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pcmoor » Thu Nov 12, 2020 10:52 am

It has been reported that modified DC copies do not list in the writer, however still no fix, probably unlikely now LCs are the flavor, so we wait while they re-event the wheel instead of fixing thats broken or out of round...

https://forums.sketchup.com/t/generate- ... pies/80600 (2 years)

n this second case, my solution would be NOT to modify the copy of the original instance but instead include an invisible pre-set 100x50 component, appearing in the right places(s) when needed... Could this work?


I believe this your best option, plus a 50x50
0

pcmoor 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Thu Nov 12, 2020 11:58 am

Thanks a lot, as usual.
I ask you a personal opinion: do you think that the trimble team will dismiss the Dynamic Component system? I've writtena whole load of them..... :cry: :cry: :cry:
0

pibuz 
 

Re: New to DC: topic for my simple questions to the pros

Postby pcmoor » Fri Nov 13, 2020 2:30 am

I attach my component (which I'm particularly proud of, maybe naively...).


You should be proud, you have grasp the technical challenges of a relative difficult scripting language and now adding you own spin on it. This is what is going to help you adapt and improve whatever the future changes are.

It is clear that LCs is where the development is, hardwired and web savvy.
DCs will still be around for 5 years but likely, as before, no development'

We intend to launch authoring tools for Live Components sometime next year. Being able to author Live Components is just the beginning though. Those apps/tools will expand over the next several years to offer new ways of modeling in conjunction with SketchUp.

https://forums.sketchup.com/t/introduci ... /139815/10

I understand they acquired the concept
https://forums.sketchup.com/t/introduci ... /139815/33

I would agree with Dan on the period ahead...
The Dynamic Components extension has not had any new features for many many years, and will (most likely) not get any more. SketchUp team has said this before. There are too many extensions (some Trimble) that now rely upon the DCs to remain as they are.

It has also been like “pulling teeth” to get errors in the Dynamic Components extension fixed. I do hope (and politic) for all existing easily fixed errors in DC code to be fixed, before it is “retired” to an optional extension.

So, it is most likely [speculating] that the Dynamic Components extension would be “frozen” at some version, and thereafter remain as such in the Extension Warehouse as an optional extension. (Ie, it may no longer be distributed as a “default” extension with the SketchUp installer. But [speculating] this is not likely to happen for several major cycles until after Live Components is mature enough.)

https://forums.sketchup.com/t/livecompo ... /140441/11
0

pcmoor 
 

Re: New to DC: topic for my simple questions to the pros

Postby pibuz » Wed Mar 24, 2021 7:13 pm

Hi again! I've encontered a critical misfunction, I'm posting this in the hope someone can help me figure out how to dodge this.

In the file I attach there's a panel. If I copy the panel, select both copies and change the length, both component react correctly BUT the formulas contained in the last 3 top-level attribute rows are deleted, substituted by their value as fixed number.

What can cause this?

And secondary: is there a way to apply a certain DC configuration to another DC of the same "family"?

Thanks in advance!

****EDIT****
Found another user's post showing same issue. Seems to be related to the attribute state set to "User can see". Thanks!
0

pibuz 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Dynamic Components

Who is online

Users browsing this forum: No registered users and 0 guests

Visit our sponsors: