MarcelP102 Posted June 19, 2022 Share Posted June 19, 2022 I'm planning to make a script that sets the feature service of a layer. Get's the geometry and than changes to another feature service and repeat the process. Unfortunately I can't find a function to set feature service of a layer. It's a relative new function, available since 2022 so perhaps that's why it's not available at the Wiki? Quote Link to comment
Marionette Maven Marissa Farrell Posted June 20, 2022 Marionette Maven Share Posted June 20, 2022 I'm not seeing any VS function accessibility for feature layers at this moment in my list, either. I can throw an enhancement request in for you if you'd like? Quote Link to comment
MarcelP102 Posted June 20, 2022 Author Share Posted June 20, 2022 Thanks for looking in to it. Yes, please make an enhancement request. Quote Link to comment
Vectorworks, Inc Employee iborisov Posted July 12, 2022 Vectorworks, Inc Employee Share Posted July 12, 2022 On 6/19/2022 at 3:16 PM, MarcelP102 said: I'm planning to make a script that sets the feature service of a layer. Get's the geometry and than changes to another feature service and repeat the process. Unfortunately I can't find a function to set feature service of a layer. It's a relative new function, available since 2022 so perhaps that's why it's not available at the Wiki? Hi @MarcelP102 Could you give more details about the algorithm you want to follow when setting a feature service to a layer? I assume everything should be hidden with no popup dialogs? If this is desired, you will have to provide at least the URL address, Layer ID, Service Type(ESRI Feature or WFS), boolean for Request View Region features, and maybe more like that. Thanks. Quote Link to comment
MarcelP102 Posted July 12, 2022 Author Share Posted July 12, 2022 (edited) Hi @iborisov I want to automatically download the 'BGT', the Dutch public map service. Right now it's available within ArcGIS online, see screenshot from VW below. As you can see it is build up with a lot of different layers. So a script than can download each BGT map in the same VW layer can speed up the process. So no pop-up and hardcode the URL, Layer ID etc is OK. (even better would be if we can assign multiple feature services to the same VW layer. And we can map each feature service to a class. Than there would be no need for this script) Edited July 12, 2022 by MarcelP102 Quote Link to comment
Vectorworks, Inc Employee iborisov Posted July 22, 2022 Vectorworks, Inc Employee Share Posted July 22, 2022 Hi @MarcelP102, My plans are to add four vector script functions and it would be great to hear your opinion. The vector script functions are as follows: PROCEDURE BindLayerToArcGISFS( hLayer :HANDLE; strURL :STRING; strFeatureID :STRING; bRequestAll :BOOLEAN); PROCEDURE BindLayerToWFSFS( hLayer :HANDLE; strURL :STRING; strFeatureName :STRING; bRequestAll :BOOLEAN); PROCEDURE UpdateLayerFromFS( hLayer :HANDLE; bRequestAll :BOOLEAN); PROCEDURE UpdateFeatureLayer( hLayer :HANDLE); You can use the "FOR" cycle and BindLayerToArcGISFS() to achieve your goal: PROCEDURE ArcGISFeatureService; VAR id : INTEGER; url : STRING; featureId : STRING; requestAll : BOOLEAN; BEGIN url := 'https://basisregistraties.arcgisonline.nl/arcgis/rest/services/BGT/BGT_objecttypen/FeatureServer'; requestAll := TRUE; FOR id := 0 TO 50 DO BEGIN featureId := Num2Str(0, id); BindLayerToArcGISFS( ActLayer, url, featureId, requestAll ); END; END; RUN (ArcGISFeatureService); Quote Link to comment
MarcelP102 Posted July 22, 2022 Author Share Posted July 22, 2022 Hi @iborisov great! To be honest I'm only programming for couple of months now. But reading you example script it seems to do what I intent to use it for. Will this ship with the release of VW 2023? Quote Link to comment
Vectorworks, Inc Employee iborisov Posted July 22, 2022 Vectorworks, Inc Employee Share Posted July 22, 2022 9 minutes ago, MarcelP102 said: Will this ship with the release of VW 2023? Yes, it should. 1 Quote Link to comment
MarcelP102 Posted July 22, 2022 Author Share Posted July 22, 2022 Nice, looking forward to that. (Setting the clip cube position/rotation is also something that is missing in Vectorscript. Perhaps you could pull some strings to put this on the agenda? Thanks!) Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.