• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Dynamic Component DCFunctionsV1 within in Module

Scheduled Pinned Locked Moved Developers' Forum
34 Posts 4 Posters 8.2k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    michaelwhksg
    last edited by 4 Apr 2017, 06:44

    Since we are unable to wrap the class DCFunctionsV1 in the name space, if we just submit the script with 2 parts, one of which is the DCFunctionsV1 and letting the formula be defined as my own unique name, and the second part which is wrapped within my name space, will this work? Will EWH team accept this?

    For example,...

    # add_funcs.rb
    # extends DCs functions
    require('sketchup')
    if Sketchup.version.to_i <= 8
      require('dynamiccomponents.rb')
    else
      require('su_dynamiccomponents.rb')
    end
    if defined?($dc_observers)
      # Open SketchUp's Dynamic Component Functions (V1) class.
      # only if DC extension is active
      class DCFunctionsV1
        protected
        unless DCFunctionsV1.method_defined?(;XXXXXX)
          # access to Ruby's arctangent method
          # Usage; =ABC123
          def (we give this definition a unique name)
            return XXXXXX (my own unique formula)
          end
        end#unless
        protected;ABC123
      end#class
    end#if
    
    module ABC
    module ABC123
    
    codes to be in the name space
    
    end #ABC123
    end #ABC
    
    1 Reply Last reply Reply Quote 0
    • M Offline
      michaelwhksg
      last edited by 5 Apr 2017, 05:33

      Hi Dan,
      Thanks for the feedback.

      1. Have already edited the previous posts with the code tags.
      2. Have changed the example slightly (removal of the name atan2).
      3. Will use my unique name for the formula in the DCFunctionsV1 class.

      Will try to submit the extension after I clean up my code.
      Thanks.

      1 Reply Last reply Reply Quote 0
      • topic:timeago-later,about a month
      • M Offline
        michaelwhksg
        last edited by 5 May 2017, 23:52

        Hi TIG, Dan,
        Is there any resources online that shows how we can input the licensing code to our script? The below web link automatically directed me to another webpage instead of the licensing tutorial.

        http://www.sketchup.com/intl/en/developer/docs/tutorial_licensing

        1 Reply Last reply Reply Quote 0
        • topic:timeago-later,10 days
        • D Offline
          Dan Rathbun
          last edited by 15 May 2017, 19:36

          The licensing tutorial was removed pending an overhaul. No amount of asking has resulted in any estimation of when the tutorial will be edited and reposted.

          Julia Christina Eneroth has posted her own licensing tutorial with test code at GitHub:
          https://github.com/Eneroth3/Sketchup-Api-Licensing-Test

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • D Offline
            Dan Rathbun
            last edited by 15 May 2017, 19:39

            There is a problem with licensing. You will likely NOT pass the extension review if you alter the DCFunctionsV1 class in your extension code.

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • T Offline
              TIG Moderator
              last edited by 15 May 2017, 21:42

              This has been discussed in a circle !

              I said earlier that any code which was altering a 'built-in' class [like the DC's] was like to fall foul of the EW checkers, and of course [thereby] its licensing regime...
              It would be possible to write a 'non-compliant' extension which did change the DC's class and publish it BUT it can't be downloaded through the EW [there are many other options] - and if it's to be licensed it'll have to be done through another licensing system [again there are several others]...

              It is somewhat perverse that SketchUp freely distributes its DC tools, but then does not allow any additions to be made to that code - even with the strictest trapping to avoid overwriting new methods or clashing with other authors - it seems to make the DCs something of an evolutionary dead-end...

              TIG

              1 Reply Last reply Reply Quote 0
              • D Offline
                Dan Rathbun
                last edited by 19 May 2017, 20:22

                (TIG, I know you said this, but apparently the OP didn't understand it well.)

                I would prefer that Trimble updates the DC code to add all those missing math functions that Scott did not implement, (... perhaps because Google Docs Spreadsheets did not support them at that time ?)

                And then I'd like them to be serious about implementing nifty new DC Functions that users request, in a timely manner !

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • M Offline
                  michaelwhksg
                  last edited by 21 May 2017, 21:16

                  Thanks, Dan. Will take a look at Julia's tutorial.

                  I do agree that some improvements can be made to the DC functionalities. This will definitely benefit a lot of users.

                  1 Reply Last reply Reply Quote 0
                  • topic:timeago-later,16 days
                  • M Offline
                    michaelwhksg
                    last edited by 7 Jun 2017, 05:06

                    Just an update to everyone.

                    After a few rounds of re-submission of my extension to meet the stringent requirements, this time, it is taking slightly longer than usual. I am still waiting for the status of being published in the Extended Warehouse.

                    In any case, below are some of the screenshots I have created for the extension.

                    1 Reply Last reply Reply Quote 0
                    • topic:timeago-later,9 days
                    • M Offline
                      michaelwhksg
                      last edited by 16 Jun 2017, 16:35

                      Hi, does anyone know how long it takes to get an extension approved by the Extension Warehouse Team normally?

                      After a few rounds of back and forth and updating the extension, I submitted the extension again on 29May. Aside from getting the one auto-response, I did not hear anything else.

                      I then resubmitted again on 13June. Still no change in the status.

                      Any advice on this?

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        Dan Rathbun
                        last edited by 16 Jun 2017, 21:57

                        They have been known to be slow. Perhaps it's the summer vacation season ?

                        I'm not here much anymore.

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          michaelwhksg
                          last edited by 17 Jun 2017, 00:01

                          Oh I see. Thanks a lot Dan. Will wait for the feedback from them then.

                          1 Reply Last reply Reply Quote 0
                          • M Offline
                            michaelwhksg
                            last edited by 22 Jun 2017, 23:39

                            Hi TIG and Dan, good news. My extension is being approved by the EWH team and the trial version is now in the Extension Store.

                            Link Preview Image
                            SketchUp Extension Warehouse

                            Your library of custom third-party extensions created to optimize your SketchUp workflow.

                            favicon

                            (extensions.sketchup.com)

                            Like you mentioned previously, the EWH team initially rejected the idea of having the DCFunctionsV1 approach. After I explained the rationale of using it, they finally gave the approval.

                            Seems like there's light at the end of the tunnel.

                            Thanks.

                            My next challenge will be the licensing issue.

                            I went thru Julia Christina Eneroth's tutorial, but still have some questions. For example, in the code, ext_id = "15dfa30f-4957-4549-8cdb-e97b5727a13a", I am unsure how this comes about.

                            Anyway, one way I circumvent this is to have the trial version in the Extension Store and the full version in my website (still fixing up the shopping cart in my website though).

                            Thank for the guidance. You guys rock!

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              TIG Moderator
                              last edited by 23 Jun 2017, 00:09

                              A miracle for common-sense - well done !

                              TIG

                              1 Reply Last reply Reply Quote 0
                              • D Offline
                                Dan Rathbun
                                last edited by 26 Jun 2017, 22:47

                                @michaelwhksg said:

                                My next challenge will be the licensing issue.

                                Please start a new topic, or find one that is already on this subject.

                                I'm not here much anymore.

                                1 Reply Last reply Reply Quote 0
                                • D Offline
                                  Dan Rathbun
                                  last edited by 26 Jun 2017, 22:52

                                  @michaelwhksg said:

                                  Like you mentioned previously, the EWH team initially rejected the idea of having the DCFunctionsV1 approach. After I explained the rationale of using it, they finally gave the approval.

                                  Remember I said this ?

                                  @dan rathbun said:

                                  (3) Yes, please use a unique method name, as your implementation of the atan2 method (specifically the parameter list) is not how the rest of the world would define it for use by ALL coders.

                                  I really hope you used a unique function name and not atan2 as you had previously defined it early on.

                                  I'm not here much anymore.

                                  1 Reply Last reply Reply Quote 0
                                  • M Offline
                                    michaelwhksg
                                    last edited by 27 Jun 2017, 23:29

                                    Will look into the licensing aspect in the forum, Dan.

                                    Yes, you are right. I have used a unique function name for my extension. atan2 is just an example.

                                    By the way, I have sort of documented the steps I took to create the DC extension and have it published in the Extension Warehouse.

                                    Just to share with anyone who is interested. It is actually for my own reference in future.


                                    Creation of extension and submission to Extension Warehouse

                                    1 Reply Last reply Reply Quote 0
                                    • topic:timeago-later,2 months
                                    • M Offline
                                      michaelwhksg
                                      last edited by 28 Aug 2017, 11:53

                                      A proposed layout for a new site that shows the pallet racking, with a dedicated mezzanine on the left and conveyor system for segregating the inventory via dispatch routes.

                                      Link Preview Image
                                      WarehouseBlueprint - Warehouse Layout Design Software

                                      Model engaging 3D warehouse in 15 minutes. Build up warehouse layout design with software. Create visual presentation. WarehouseBlueprint.

                                      favicon

                                      WarehouseBlueprint (warehouseblueprint.com)


                                      Warehouse Layout


                                      Warehouse Layout - Rendered

                                      1 Reply Last reply Reply Quote 0
                                      • 1
                                      • 2
                                      • 2 / 2
                                      2 / 2
                                      • First post
                                        26/34
                                        Last post
                                      Buy SketchPlus
                                      Buy SUbD
                                      Buy WrapR
                                      Buy eBook
                                      Buy Modelur
                                      Buy Vertex Tools
                                      Buy SketchCuisine
                                      Buy FormFonts

                                      Advertisement