sketchucation logo sketchucation
    • Login
    1. Home
    2. Alienizer
    3. Posts
    ⚠️ Attention | Having issues with Sketchucation Tools 5? Report Here
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 11
    • Posts 120
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: DLL callback to ruby

      aaaaaaaaaaah OK, now it's clear to me. I can see exactly what you mean and how this works.

      Dan, thank you so much for your time to explain all this to me. I don't know how to thank you enough, and I wish I could return the favor, but you are obviously way above me that there is nothing you can learn from me. I realy appreciate it Dan.

      Now I'm gonna go play.........

      posted in Developers' Forum
      A
      Alienizer
    • RE: DLL callback to ruby

      I see. So if I use require "test.so" in my loader, then I bypass win32api and it can be cross-platform? Can the dll do everything the rb can do? How do you get the Sketchup:: object in the dll? I suppose I need sketchup.h or something?

      posted in Developers' Forum
      A
      Alienizer
    • RE: DLL callback to ruby

      oh ok, I get it. So in my loader, I can simply have it load the dll which will do all of what the rb does, and remove the rb alltogether?

      I am reading up on your links, much to read and learn!

      posted in Developers' Forum
      A
      Alienizer
    • RE: DLL callback to ruby

      @unknownuser said:

      That way the C code can be compiled on both platforms as a .so file. (Windows users won't need to use Win32API calls.)

      So than, how do you call a function in the dll if you don't use Win32API calls?

      posted in Developers' Forum
      A
      Alienizer
    • RE: DLL callback to ruby

      I have a testloader.rb in the plugins directory that is...

      $;.push Sketchup.find_support_file("Plugins/test/")
      Sketchup;;require 'test'
      

      ...and then my test.rb loads, and in turn, the alien.dll loads as well!

      Does the dll load because I have $testproc = Win32API.new("alien.dll", "test", [, "V")] in the rb script?

      I do not have a require("alien.dll") in the rb script, do I still need to put it in?

      All goes well in C and in Delphi. But in FPC using the same identical code as Delphi, SK gives me that error I posted last. I do it in C but my wife knows nothing about C and she's learning Pascal, so she use Lazarus/FPC. Any ideas why the FPC dll won't load in SK but it will load using any other test app I made to test it!!

      posted in Developers' Forum
      A
      Alienizer
    • RE: DLL callback to ruby

      @unknownuser said:

      // Entry point for Ruby require() method:
      void Init_ExactcaseFilenameofDLL()

      If I put my dll in plugins/test/ along with test.rb, does SK load both or do I have to (require "test.dll") in the .rb script?

      I did have void Init_test() and exported it too, but I still get this error...

      Error Loading File test.rb
      (eval):16:in `initialize': LoadLibrary: C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/test/test.dll

      which is the following line in the .rb script...

      $testproc = Win32API.new("test.dll", "test", ["V"], "V")

      posted in Developers' Forum
      A
      Alienizer
    • RE: DLL callback to ruby

      That's what I tried to do at first, but failed with exception errors all over. I wasn't using INT2NUM or anything. I was going the wrong way, not knowing what I was doing. I wish I knew what you know.

      Thanks Dan, your help was more than helpfull, and much appreciated. Without your help, I'd still be in the dark.

      posted in Developers' Forum
      A
      Alienizer
    • RE: DLL callback to ruby

      Is that all 😲 😲
      It works like a charm Dan

      Maybe I'll drop programming and go get a job at McDonalds. You are the genius here. Thanks a million.

      posted in Developers' Forum
      A
      Alienizer
    • RE: DLL callback to ruby

      Thanks Dan, but I could use a little more help πŸ˜’

      I found this...
      https://www.ruby-forum.com/topic/83478

      but I can't grasp on how to do it!

      I can get my C code to call ruby functions in the ruby dll but I can't get it to call a user function in my sketchup .rb script!

      I'm not sure how to register the callback, and how to pass the user proc to my dll, if that's how it work!

      posted in Developers' Forum
      A
      Alienizer
    • DLL callback to ruby

      Anyone knows how to pass a callback proc to a DLL from ruby? When sketchup starts, it loads my .rb file, and in turn it loads my .dll, but I need my .dll to call back a proc in my ruby script!

      Thanks!

      posted in Developers' Forum
      A
      Alienizer
    • RE: [Plugin] OBJexporter v3.0 20130131

      One more model that the texture does not export properly but it does with the skp obj exporter...

      Error 404 (Not Found)!!1

      favicon

      (sketchup.google.com)

      Beside that, you rock, so as your exporter, thank you.

      posted in Plugins
      A
      Alienizer
    • RE: Ruby code to extract watermark

      @thomthom said:

      There might very well be something like that in SketchUp - but not something that's exposed to the Ruby API. 😞 There are some bits and bobs missing.

      Maybe it's just an undocumented api?

      posted in Developers' Forum
      A
      Alienizer
    • RE: Ruby code to extract watermark

      @thomthom said:

      Where have you found this?
      I don't find it anywhere in the Ruby API...

      In Sketchup.exe there is the word 'WatermarkManager' (no space) so it must mean something oter than plain English 'Watermark Manager'.

      posted in Developers' Forum
      A
      Alienizer
    • RE: Ruby code to extract watermark

      But there is a 'WatermarkManager', perhaps undocumented?

      posted in Developers' Forum
      A
      Alienizer
    • Ruby code to extract watermark

      Does anyone know how how to get the watermark image in the ruby console? The API shows how to get the active_style and such, but no reference to the watermark!

      Thanks for any advice you can provide.

      posted in Developers' Forum
      A
      Alienizer
    • RE: [Plugin] OBJexporter v3.0 20130131

      TIG, does your exporter use the object axis to orient the triangle? The reason I ask is, if I change the axis from blue up to blue down in a group, the triangle face is reversed when exported, and the ray/triangle test shows that it hit the backface when in fact it did not! Same happen with the SK obj exporter. Any idea? thanks.

      posted in Plugins
      A
      Alienizer
    • RE: Plugin DLL

      I'm even more mixed up now πŸ’­ πŸ˜•

      OK, if you import the Skectup.exe Type Library, you get the following...

      LIBID_SketchUp: TGUID = '{4BFA2F61-04D4-11D4-92DE-0050DA73EEF2}';

      IID_ISkpPoint3d: TGUID = '{797A86D9-8EC2-4064-BE94-D4F589FC1A53}';
      IID_ISkpVector3d: TGUID = '{1D2F07F1-6BC9-44E8-A228-489E0C6393A0}';
      IID_ISkpApplication: TGUID = '{06E0C968-19B6-4973-98CF-E056E6D157AA}';
      IID_ISkpDocument: TGUID = '{E6E72823-A815-4760-91A1-76CED4F4AA60}';
      IID_ISkpBoundingBox3d: TGUID = '{20131A69-C286-4B2E-9309-E8F6014DF323}';
      IID_ISkpFonts: TGUID = '{DF614131-E9F3-42B9-93A2-391058AC0FC1}';
      IID_ISkpFont: TGUID = '{69AD8EA1-31BB-4070-B61D-A1313DDCB5BA}';
      IID_ISkpView: TGUID = '{2EF46735-233B-45A7-983A-361649055B98}';
      IID_ISkpMaterials: TGUID = '{57241BDB-31FA-4831-A00B-7B56733F07F8}';
      IID_ISkpMaterial: TGUID = '{E405969E-3C7C-4E74-B73C-5EA278E9EB71}';
      IID_ISkpTexture: TGUID = '{FE2473EA-2BF1-460B-BC15-3F9560F78BA0}';
      IID_ISkpLayers: TGUID = '{D00F5B9C-77DD-4EAA-9885-AEB6EEB177CF}';
      IID_ISkpLayer: TGUID = '{EB0A8A47-D3D3-486E-8F96-626E8F0A1670}';
      IID_ISkpOptionsManager: TGUID = '{31A3B2BA-D512-473D-9289-2709BDBF2D1D}';
      IID_ISkpOptionsProvider: TGUID = '{120A278B-61BF-49C9-8A5C-4045D5631DCC}';
      IID_ISkpNamedValues: TGUID = '{1513EB56-F0D5-41D0-BC71-7DB252A9032A}';
      IID_ISkpNamedValue: TGUID = '{03B1BA1E-3A11-492B-9F4F-7B5BC7C28922}';
      IID_ISkpComponentDefinitions: TGUID = '{EE7FB267-8EA2-4A5C-9121-28E45FC46AF3}';
      IID_ISkpComponentDefinition: TGUID = '{9E729685-B603-47D4-AF2C-049A89AF95B3}';
      IID_ISkpOpenings: TGUID = '{C8FB2F03-FE52-4716-B260-C372C4B5C002}';
      IID_ISkpOpening: TGUID = '{90EAE5C7-BC47-4B38-9301-11CC2F389F6C}';
      IID_ISkpComponentInstance: TGUID = '{CE351997-ABF3-434F-88D9-CDA079FA6873}';
      IID_ISkpTransform: TGUID = '{0EBA7013-9266-4F35-9056-B3187000973B}';
      IID_ISkpEntities: TGUID = '{8D3949A7-0A77-48B8-9295-EF5546998F6B}';
      IID_ISkpEntity: TGUID = '{84AA31DA-5074-42B5-950A-F46E33EF5BB8}';
      IID_ISkpComponentInstances: TGUID = '{152994E6-DD1D-4C50-AADD-BB7CDD25593E}';
      IID_ISkpCamera: TGUID = '{62DFE658-E514-4797-ADBC-FA7A0A2A22AB}';
      IID_ISkpPages: TGUID = '{6EDF2146-2D2C-4045-BE56-FB9999D979D5}';
      IID_ISkpPage: TGUID = '{E4A81C66-9699-44A5-9A10-6394B253E43C}';
      IID_ISkpCoordinateSystem: TGUID = '{40723364-9619-4CA8-BE77-25ABA612958C}';
      IID_ISkpPlane: TGUID = '{1AC7CB56-7C6A-4E9D-A274-4DCE1C5C9749}';
      IID_ISkpStyle: TGUID = '{CEDEF8D7-A41B-4964-8B3D-D6C010BDFF9E}';
      IID_ISkpSelectionSet: TGUID = '{6ABECF30-A0D8-4369-BB1F-94ABD0FD20C4}';
      IID_ISkpRenderer: TGUID = '{C7D9298D-9F63-4AB1-B96C-A8FB96F9BA08}';
      IID_ISkpStyleManager: TGUID = '{351E3A4E-E919-43EB-A17C-C01376DB2EC9}';
      IID_ISkpStyles: TGUID = '{36C97FB6-D9CC-4FAF-BBE2-D579B699DFAB}';
      IID_ISkpHLRView: TGUID = '{7E9855DB-E4D8-40D2-8E30-F4F026674E34}';
      IID_ISkpCameraM: TGUID = '{E390B61E-C271-4CB1-9793-2CA57EC19C7B}';
      IID_ISkpTextureWriter: TGUID = '{BBD2EED1-8DA6-4F4D-8E92-8A18083104B7}';
      IID_ISkpFace: TGUID = '{02228DDC-5252-499A-B8DA-EC7F1BBA1ED8}';
      IID_ISkpEdgeUses: TGUID = '{0E8633C5-2129-45E0-8628-15FE25D314DA}';
      IID_ISkpEdgeUse: TGUID = '{31B41CF2-8C8A-48BA-B8D8-837B7E86676F}';
      IID_ISkpEdge: TGUID = '{2840457C-FA4F-4CBB-93D3-088DD4D4E338}';
      IID_ISkpCurve: TGUID = '{EC4F4363-D5F9-42AF-BBBF-BAED0A9501AD}';
      IID_ISkpEdges: TGUID = '{108747BB-8B0C-46EF-A371-223B849CC2CA}';
      IID_ISkpVertex: TGUID = '{A578615C-F813-4BBA-9C1F-5E01ABF197A6}';
      IID_ISkpFaces: TGUID = '{AF7B67C6-151F-469E-B683-998B7B7D8FA2}';
      IID_ISkpLoops: TGUID = '{CBCCFB83-CD00-45A1-A631-07DCBA4B842F}';
      IID_ISkpLoop: TGUID = '{42798DB5-F496-4F69-9555-81FEB05573F0}';
      IID_ISkpVertices: TGUID = '{43CAB51D-29DF-4AD0-8DF1-3D461D32885C}';
      IID_ISkpCorrectPerspective: TGUID = '{B1808685-CEF0-42E2-AA0F-8F9570C6F09D}';
      IID_ISkpPolygonMesh: TGUID = '{54860340-05E1-4837-AEFC-BD265F7D9375}';
      IID_ISkpUVHelper: TGUID = '{2EE945F0-DBAE-4FF3-8119-64AF9378C01D}';
      IID_ISkpImage: TGUID = '{355842C5-1938-4120-93D9-A9126147400C}';
      IID_ISkpViewProvider: TGUID = '{8044FCF8-16C9-43F9-BB3C-B93983151E3E}';
      IID_ISkpHLRWriter: TGUID = '{8C930912-0653-4ADC-99E4-3438DE820D6C}';
      IID_ISkpHLRGeneration: TGUID = '{80ACB93F-E86E-4198-90BE-17805448CA0C}';
      IID_ISkpAttributes: TGUID = '{3E9D8816-993A-4C3B-9427-3458C9280AE9}';
      IID_ISkpAttribute: TGUID = '{D1A0D3D4-A608-4840-A646-2D6CA547C34C}';
      IID_ISkpFaceTextureCoordsAttribute: TGUID = '{9EA3F921-C6D0-4FC0-B0E2-A397FF2EEA39}';
      IID_ISkpAttributeDictionary: TGUID = '{B091771F-1144-4AF9-9FA3-A8D7147D42B7}';
      IID_ISkpArcCurve: TGUID = '{A5A4B9B7-3384-4750-B43B-33C788E7FFC3}';
      IID_ISkpLineCurve: TGUID = '{BD4EEF9E-B1D1-4FE1-A835-6EA9568AADC1}';
      IID_ISkpDrawingElement: TGUID = '{85195406-7341-443C-AFCD-395EF30954F6}';
      IID_ISkpEntityTransformPairs: TGUID = '{4648DE5B-1584-4748-8F82-FAEDDAF0158F}';
      IID_ISkpEntityTransformPair: TGUID = '{44ACF88B-DE77-4C84-BA20-90D05C684416}';
      IID_ISkpTextures: TGUID = '{08FAA070-8E8D-49AA-B691-350E803A593B}';
      IID_ISkpText: TGUID = '{D45DAAEC-1E6C-4908-8C3F-168838AA0B4B}';
      IID_ISkpTexts: TGUID = '{3A09F67E-C54A-404A-8C46-D7F35576CDD6}';
      IID_ISkpSectionPlane: TGUID = '{22B29B28-69BB-49BE-92BA-8D2509EA8C3A}';
      IID_ISkpSectionPlanes: TGUID = '{5B27CB66-EE1B-4ED8-9898-F0DA064FAB30}';
      IID_ISkpDimension: TGUID = '{738115B6-B41C-4EE4-94C1-E48AE59B225D}';
      IID_ISkpDimensionStyle: TGUID = '{FE6A3A09-EE20-4DE1-A4C9-346AF3B95DBF}';
      IID_ISkpDimensionLinear: TGUID = '{8AD10337-A9CE-4281-89FA-EE6ADA9C242D}';
      IID_ISkpDimensionRadial: TGUID = '{663E44A6-13A5-43B8-B216-8277B9E1AE1E}';
      IID_ISkpDimensions: TGUID = '{9DD5AFA7-10BC-4537-8793-CDCF86CEB17E}';
      IID_ISkpGroup: TGUID = '{92868017-548A-40AA-843E-19F20114D00A}';
      IID_ISkpGroups: TGUID = '{0D7263FC-4F37-46EC-B518-4FF92D40BC3D}';
      IID_ISkpConstructionLine: TGUID = '{1BBD3AAA-C3A2-4C54-B8EC-FDD3A148BBFB}';
      IID_ISkpConstructionLines: TGUID = '{EA8BDFA0-D3A0-4196-923B-65E39468EBC6}';
      IID_ISkpConstructionPoint: TGUID = '{D14336D5-5378-4B8A-8BEE-A35D92CAEA86}';
      IID_ISkpConstructionPoints: TGUID = '{B1409D01-70CB-4AC8-93C2-94A406C42BFB}';
      IID_ISkpPolyline3d: TGUID = '{A17CE198-CFCF-4F39-80A2-6A6512CF1E4B}';
      IID_ISkpPolyline3ds: TGUID = '{5BF6968B-7C46-4045-A6D8-5CF4CC600C7D}';
      IID_ISkpImages: TGUID = '{80EC0989-9FE2-4996-A93C-8DD0611FE3B7}';
      IID_ISkpEntityProvider: TGUID = '{16BB046B-9742-4670-81C0-77C0804E2931}';
      IID_ISkpEntityProviderStatistics: TGUID = '{B294B3BA-7043-4714-BC7F-3F1F4FCA6947}';
      IID_ISkpFileReader: TGUID = '{D9B338BF-6B14-4813-AB17-DA7E7C64CAB5}';
      IID_ISequentialStream: TGUID = '{0C733A30-2A1C-11CE-ADE5-00AA0044773D}';
      IID_IStream: TGUID = '{0000000C-0000-0000-C000-000000000046}';
      IID_ISkpStyleManagerM: TGUID = '{91CC81C5-3060-4E42-B119-FBF6485C5E2B}';
      IID_ISkpStyleM: TGUID = '{D8B976E3-7D3B-4938-A9AB-7154666261C0}';
      IID_ISkpInputPointFinder: TGUID = '{4861A4BE-32EE-4C5D-8B88-350D0463E445}';
      IID_ISkpNamedValuesM: TGUID = '{6F13DFAB-D068-44DB-88E6-3D0F22C8BFFB}';
      CLASS_SkpCurve: TGUID = '{F14F48BC-A565-4C4A-B89D-B937A7C3F92F}';
      CLASS_SkpArcCurve: TGUID = '{B3DB0982-7499-4DA9-A2E2-5C8CDF83A03E}';
      CLASS_SkpLineCurve: TGUID = '{4A1AB8BE-7F80-4CD5-B45A-B647C01BCBD5}';
      CLASS_SkpBoundingBox3d: TGUID = '{49AD9805-4DE2-46B7-B10B-543D37E8E34C}';
      CLASS_SkpDimensions: TGUID = '{7860E6D1-C06A-409C-ACBC-7A028C89BEE8}';
      CLASS_SkpDimensionStyle: TGUID = '{14BB888F-6B45-4C84-885C-6D9C81C0431C}';
      CLASS_SkpDimensionRadial: TGUID = '{68A7A031-0A69-434D-9D76-2A9EF6DD2E95}';
      CLASS_SkpDimensionLinear: TGUID = '{2A964D77-D81E-4D1B-84A8-8F4703237A8B}';
      CLASS_SkpFont: TGUID = '{654DE6F5-EF09-4AB1-8B13-58EA07E91AE2}';
      CLASS_SkpFonts: TGUID = '{8DBA2A17-8693-41B4-950F-35AA18BC9E6E}';
      CLASS_SkpView: TGUID = '{AFD3FC6D-518B-4783-AA70-4F71A1B20DC5}';
      CLASS_SkpText: TGUID = '{2F890771-B9CB-4428-9C66-8C8A3557A217}';
      CLASS_SkpTexts: TGUID = '{BF6E4AE8-A322-4602-833F-C39D25630538}';
      CLASS_SkpOptionsManager: TGUID = '{27BB57D5-F11E-4EB5-B39A-C9DB40023B48}';
      CLASS_SkpOptionsProvider: TGUID = '{9D16F3A7-3A4F-4036-A422-E70DC31D5A38}';
      CLASS_SkpFaceTextureCoordsAttribute: TGUID = '{DD8A0680-D541-4557-A265-6FAA2EC51A87}';
      CLASS_SkpAttributeDictionary: TGUID = '{E60D14BB-2B0A-4D00-A82A-5584273629F9}';
      CLASS_SkpAttribute: TGUID = '{CACB1EA7-619B-4209-B308-BDFCF086DAF7}';
      CLASS_SkpAttributes: TGUID = '{0ADF95E1-BA0D-4588-B0F4-9FD3EF8DB5F4}';
      CLASS_SkpPlane: TGUID = '{41F635F4-FFAC-4F67-9E3E-3223816767F1}';
      CLASS_SkpNamedValue: TGUID = '{A6202410-06BB-4DCD-B575-14B2C4476E1C}';
      CLASS_SkpEntities: TGUID = '{AD6339AA-D127-47E4-A0A6-8AFB2B8D79E9}';
      CLASS_SkpPolygonMesh: TGUID = '{051594E4-D5C2-4988-BBE2-01E23DA53E50}';
      CLASS_SkpFace: TGUID = '{3AC00E24-2B2F-4368-95C0-9FFA0F305AFD}';
      CLASS_SkpFaces: TGUID = '{2CCE567F-25AD-4523-9F79-6A42A76F7403}';
      IID_ISkpTextureWriter2: TGUID = '{5470F0F3-7883-4EF2-881F-9CA1DA8DD0E8}';
      CLASS_SkpTextureWriter: TGUID = '{7915DD58-5887-4CF5-A802-6A517665E535}';
      CLASS_SkpApplication: TGUID = '{FCD8BDD9-F12C-4646-9829-5387D844C5E1}';
      IID_ISkpAttributeProvider: TGUID = '{4E8E2CD6-3A33-41EA-A725-6579E40F08D1}';
      IID_ISkpThumbnailProvider: TGUID = '{E47E315D-9C39-444D-B91F-12AA14EFC484}';
      IID_ISkpFileWriter: TGUID = '{562CEEEE-91BF-4296-8F72-5635E7412FA7}';
      CLASS_SkpDocument: TGUID = '{27E7D638-4E08-4C2C-8BD0-2DE34BC896EA}';
      CLASS_SkpEdge: TGUID = '{D434F6F4-D7F8-42D7-9F63-B2AA4D609E50}';
      CLASS_SkpEdges: TGUID = '{13F82ADC-269F-4D7E-89C4-508786C3B8CB}';
      CLASS_SkpNamedValues: TGUID = '{CD2F8CCA-8B04-4567-B152-48C3B12D2768}';
      CLASS_SkpVertex: TGUID = '{48A28EA9-844F-4260-8BC1-EEFA394E9DB4}';
      CLASS_SkpVertices: TGUID = '{2B9FB964-B154-4969-B356-F5E3CF81EFDC}';
      CLASS_SkpLayer: TGUID = '{3A62EB90-9625-4F3E-AFC6-A4DFC3D11A5E}';
      CLASS_SkpLayers: TGUID = '{35E1EF8A-CD0D-490A-B493-A78841D79290}';
      CLASS_SkpMaterial: TGUID = '{2510264C-96DC-4FC4-88B9-E2503F49A8DD}';
      CLASS_SkpMaterials: TGUID = '{3307BAAB-4624-4423-B076-37AB33F3EE6A}';
      CLASS_SkpTexture: TGUID = '{19356807-23AB-4A7B-AC98-C77381141A5D}';
      CLASS_SkpTextures: TGUID = '{F4728C8E-AA35-4092-AD8E-B8090A6A9EDE}';
      CLASS_SkpTransform: TGUID = '{25D39F1B-0A6F-4A8A-ABAC-9FE56BE4D45E}';
      CLASS_SkpComponentDefinition: TGUID = '{2C39F89C-458F-4435-BA79-8ED3CEAE9068}';
      CLASS_SkpComponentDefinitions: TGUID = '{09A855B9-440D-4EC0-BCCF-DBD1E2C6AAF5}';
      CLASS_SkpComponentInstance: TGUID = '{1ABECA09-D994-4EB4-8421-747F7C12E2D8}';
      CLASS_SkpComponentInstances: TGUID = '{23623210-E18A-43B5-AF25-F259DF138024}';
      CLASS_SkpEdgeUse: TGUID = '{682A0B04-C07B-4ED1-963A-8E776CF83085}';
      CLASS_SkpEdgeUses: TGUID = '{3FDE8661-D7D6-4C34-ABEB-FA55A60A6771}';
      CLASS_SkpLoop: TGUID = '{0D6DB7C0-3DDB-49CB-BB65-B93597609104}';
      CLASS_SkpLoops: TGUID = '{1A39AA92-1B88-4512-AE26-2F86CBBC2D84}';
      CLASS_SkpPolyline3d: TGUID = '{3BB792D4-B6B8-417A-8C5B-ED3CA179140E}';
      CLASS_SkpPolyline3ds: TGUID = '{7A5B60ED-E4E5-4229-96E9-DFB339861AFA}';
      CLASS_SkpConstructionLine: TGUID = '{5812305B-4102-4B5F-AF49-A1D781ED8241}';
      CLASS_SkpConstructionLines: TGUID = '{F8F0804E-5DB3-4396-A9B1-1778A1E3A1CF}';
      CLASS_SkpConstructionPoint: TGUID = '{4031A3A9-5D14-4BA4-9119-7B89D4605AC4}';
      CLASS_SkpConstructionPoints: TGUID = '{C53AFEFC-2D79-45B2-A538-9C38956471D6}';
      CLASS_SkpGroup: TGUID = '{1594CED1-F405-40C4-9776-E8D1422EDA12}';
      CLASS_SkpGroups: TGUID = '{E9D42944-0F9B-405C-B31F-41FD03EEF9D5}';
      CLASS_SkpImage: TGUID = '{CE5F0306-2A7C-4C75-8D52-16A5115C2747}';
      CLASS_SkpImages: TGUID = '{A00A8FB0-1EB4-4530-8C60-318FA96F5CC0}';
      CLASS_SkpCamera: TGUID = '{A4FCD122-86D6-4B7A-B151-FE3EE14A978B}';
      CLASS_SkpPage: TGUID = '{6BAC97E8-48D7-4D4C-A079-F1018C0844A3}';
      CLASS_SkpPages: TGUID = '{52E11A33-1143-49EE-A82F-5191060FAC05}';
      CLASS_SkpEntityTransformPair: TGUID = '{5A875310-D0D3-4BA5-BC95-D8C1BC7DFFBC}';
      CLASS_SkpEntityTransformPairs: TGUID = '{68DCA68F-5D93-4E90-9245-11159BC6C1FD}';
      CLASS_SkpOpening: TGUID = '{0B357E1E-6BCD-4056-BF1A-55B7B6E2BCFB}';
      CLASS_SkpOpenings: TGUID = '{05D8F76C-74B9-4CB6-94BB-B38C2FCB7991}';
      CLASS_SkpPoint3d: TGUID = '{55EE31FA-25CB-4293-AEB2-31884694688B}';
      CLASS_SkpVector3d: TGUID = '{05EB8168-4E72-4024-9F17-5E9D3BED4B72}';
      CLASS_SkpSelectionSet: TGUID = '{D051308C-6EBA-48F0-B8A2-7438FFBF06F4}';
      CLASS_SkpSectionPlane: TGUID = '{80600D2D-009F-4904-975B-752D9B8BAAA0}';
      CLASS_SkpSectionPlanes: TGUID = '{9CE03B4D-6833-43C4-BED8-6A37D78C2085}';
      CLASS_SkpUVHelper: TGUID = '{47E17463-97A6-4026-83FC-E0CFF4928B6E}';
      CLASS_SkpCoordinateSystem: TGUID = '{17496FE0-F9D0-4297-8F77-5CC879D8381E}';
      CLASS_SkpEntityProviderStatistics: TGUID = '{56C28985-CF66-43DC-ABF6-EDF774EBDB12}';
      CLASS_SkpRenderer: TGUID = '{56C28985-CF66-43DC-ABF6-EDF774EBDB13}';
      CLASS_SkpStyleManager: TGUID = '{B9AAEAC5-0EC8-4E7C-908F-6F6CE0A5EE19}';
      CLASS_SkpStyle: TGUID = '{C8BC9942-B8F1-439D-AF85-8AFDC873190E}';
      CLASS_SkpStyles: TGUID = '{5B8D9FBF-260C-409C-AD2C-2F908C6656D5}';
      CLASS_SkpCameraM: TGUID = '{2231CC58-63BA-4BAF-B800-ABD9CC8B401D}';
      CLASS_SkpNamedValuesM: TGUID = '{D43DB17A-D44D-4CCC-B556-AB8C3E178149}';

      As you can see, you have everything that Sketchup ruby has. For example, the Document object...

      ISkpDocument = interface(IUnknown)
      ['{E6E72823-A815-4760-91A1-76CED4F4AA60}']
      function Get_Application(out pVal: ISkpApplication): HResult; stdcall;
      function Get_ModelExtents(out pVal: ISkpBoundingBox3d): HResult; stdcall;
      function Get_Fonts(out pVal: ISkpFonts): HResult; stdcall;
      function Get_Materials(out pVal: ISkpMaterials): HResult; stdcall;
      function Get_Layers(out pLayers: ISkpLayers): HResult; stdcall;
      function Get_OptionsManager(out pVal: ISkpOptionsManager): HResult; stdcall;
      function Get_ComponentDefinitions(out pDefinitions: ISkpComponentDefinitions): HResult; stdcall;
      function Get_CurrentCamera(out pVal: ISkpCamera): HResult; stdcall;
      function Get_Pages(out pVal: ISkpPages): HResult; stdcall;
      function Get_SelectionSet(out pVal: ISkpSelectionSet): HResult; stdcall;
      function Get_Description(out pDesc: WideString): HResult; stdcall;
      function Get_Renderer(out pVal: ISkpRenderer): HResult; stdcall;
      function Get_ShadowOptions(out ppShadowOptions: ISkpOptionsProvider): HResult; stdcall;
      function Get_StyleManager(out pVal: ISkpStyleManager): HResult; stdcall;
      function Get_ModelExtentsLLA(out pVal: ISkpBoundingBox3d): HResult; stdcall;
      function Get_HLRView(out pVal: ISkpHLRView): HResult; stdcall;
      function Get_CurrentCameraM(out pVal: ISkpCameraM): HResult; stdcall;
      end;

      You can access everything using this, so that's why I'm puzzled as to why we need ruby at all. As far as I can tell, all we have to find is the Sketchup interface, and from there, we just have to query the interface for the active model and on an on.

      ...am I missing something? Or perhaps I don't know what I'm talking about or how Sketchup works at all???

      posted in Developers' Forum
      A
      Alienizer
    • RE: Plugin DLL

      I am still confused as to why we need ruby extension. Can't we just get the ISkpApplication COM interface and access Sketchup directly?

      posted in Developers' Forum
      A
      Alienizer
    • RE: Plugin DLL

      Thanks to both of you, Al and Dan.

      But I'm not sure which way to go anymore! I was under the impression that compiled code would run faster than ruby interpreter!!! As of ruby 1.8, the code is interpreted, not compiled into pcode or anything. So that confuses me even more.

      So if 1.9 will not load a dll with require(), then there is no more point on writing a dll is there? The reason I wanted to do this in the first place is for speed, and the fact that I can created windows which you can't do in ruby unless you use html, but again, html is limited, and need extra files, javascript etc.

      So what do you guys suggest? Which way is best for now and the future? I mean, they way to go about writing plugins? Simply using ruby and that's it? No more COM or anything?

      posted in Developers' Forum
      A
      Alienizer
    • RE: Plugin DLL

      I totally agree, and we should be able to write plugins entirely in a dll. First, I'm sure it's faster to execute since it's compiled, rather than interpreted by Ruby.

      But I think the Sample Extension is incomplete. It will not compile as-is. All the rb_ functions are undefined, unless I'm missing something?

      I can now see the concept, but it seems that every calls are passed as text, again slowing down the dll. Might as well write it all in ruby!

      What about the Type Library 2.0? This gives us complete access to the Sketchup API, without having ruby as the middle man. If we can get the ISkpApplication interface when the dll loads, we are in business, every API calls are visible, and easy to use, ISkpOptionsManager, ISkpOptionsProvider, ISkpEntities, ISkpCurve, ISkpFileWriter to name a few.

      posted in Developers' Forum
      A
      Alienizer
    • 1 / 1