Jump to content

matteoluigi

Member
  • Posts

    444
  • Joined

  • Last visited

Posts posted by matteoluigi

  1. main problem might be, that all windows, doors, wall-openings are nested into their corresponding walls.

    Creating a new file with all layers, stories from the original model, without any content and copying and pasting all windows, doors... and pasting them "in place" to their original location could solve your problem. I tried to copy and paste doors, windows "in place" inside  your file from one design layer into another and it worked quite well.

  2. Hi,

    I like coding and most of all benefitting from the possibilities of coding additional things.

    So I do a little vectorscript, a little Python and of course I insert code in worksheets and the Datamanager.

     

    Actually I need some data stamps and I wonder, why there isn't any possibility of inserting there some code, too. Like getting a substring or an if clause. (concat isn't necessary there ^^)

    is there any attempt in that direction?

    thank you

  3. @MullinRJ

    At least I chose your code, because it was the simplest one (and adoptable for either classes and layers,...)

     

    Now I took another step and instead of using a StrDialog i tried to handle the prefix in a variable as well.

    Unfortunately I didn't make it working:

    import vs;
    vs.SetLayerOptions(5)
    
    prefix = ['.','Keine','WBW']
    # this should be the list of all possible prefixes
    ClassL = []
    for I in range(0, vs.ClassNum()):	# build list of class names
    	ClassL.append(vs.ClassList(I+1))
    
    for aprefix in prefix:		# test all prefixes in list
      	vs.AlrtDialog(aprefix) # test, wether the prefix list really works - test passed
    	for aClassName in ClassL:		# test all names in list
    		if (aClassName[0:len(prefix)] == aprefix):
    			vs.ShowClass(aClassName)

    Good Idea (i thought), but, somehow only the 'WBW'-Classes have been set visible. I don't understand, why..

     

    I also made a test with "vs.AlrtDialog(aprefix)" - and the "for prefix in prefix:"-loop indeed passed all prefixes in the List.

    classvisibilities.zip

    I attached a/the test file as well.

    • Like 1
  4. Hi,

     

    i am actually making some tests, connecting feature services to a georeferenced vw-file.

    First i set georeferencing in the file.

    Than I created the layer "feature service layer" and georeferenced it, too.

    Than I tried to bind some Hamburg Feature Services via Arcgis online, using an own free arcgis-account and a free trial-account.

    For example "Flurstücke - Hamburg" is an interesting layer. 

    "you do not have the permission to access this resource."

     

    The Esri-Support told me, that the feature service I have been trying to bind to the design layer has been free.

    He told me, that this must be a Vectorworks-issue.

    In fact, he sent me the following page which shows a list of obviously free feature services, where all have been visible for free in an online arcgis-map.

    https://services2.arcgis.com/jUpNdisbWqRpMo35/arcgis/rest/services/

    Here the "Flurstücke"-Page, where you also can view the map on arcgis for free, without the need of an account:

    https://services2.arcgis.com/jUpNdisbWqRpMo35/ArcGIS/rest/services/Flurstuecke_Hamburg/FeatureServer

     

    What's going wrong here?

    Featureservice-tests.zip

  5. I want to read out the size of German void Objects (Schlitze & Durchbrüche).

    Afaik it's a float variable in the record format 'Break Opening CW','Delta_x''Break Opening CW','Delta_y', 'Break Opening CW','Delta_z'

    I don't want to read out the numbers in 0,xxx meters but in xxx cm. So i multiply the value by 1000.

     

    however the result from the script operation is never xxx but always either 0,xxxxxxxx-e01m or x (also all void objects do have a 0,xxx size and I multiply that 0,xxx size by 1000)

     

    I also created a worksheet, which reads out the same variables.

    ='Break Opening CW'.'Delta_x'*1000

    ='Break Opening CW'.'Delta_y'*1000

    ='Break Opening CW'.'Delta_x'*1000

    here the multiplication does work instead 

    2084655650_Bildschirmfoto2022-07-06um15_32_10.png.569d73f1ddc0a6d5acaa4ba6ced0046f.png

     

    131406631_Bildschirmfoto2022-07-06um15_33_23.png.8122a1b9b3d69f49323823c41f0d5252.png1643955291_Bildschirmfoto2022-07-06um15_33_28.png.d2dd4ee8dacd3cb294ff0a57e2833fcb.png

    that's so strange to me. 0,250*1000 should be 250 and not 2,00, 0,500*1000 should be 500 and not 5,00...

    I tried a lot, Num2StrF, Num2Str(0,...), multiplication by 1000000, no multiplication,... every time I use Num2Str 0,xxx changes in x.

    I don't really understand, what's going on there...

     

    ( i also attach the vwx 2022 SP3 file)

     

     

    def parentobjectcheck(SDBH):
    	HNDL=vs.GetParent(SDBH)
    
    	SDBx = vs.GetRField((SDBH),'Break Opening CW','Delta_x')
    	SDBx = vs.Num2Str(2,SDBx*1000)
    #	SDBx = vs.Round(SDBx)
    
    	SDBy = vs.GetRField((SDBH),'Break Opening CW','Delta_y')
    	SDBy = vs.Num2Str(2,SDBy*1000)
    #	SDBy = vs.Round(SDBy)
    
    	SDBz = vs.GetRField((SDBH),'Break Opening CW','Delta_z')
    	SDBz = vs.Num2Str(2,SDBz*1000)
    #	SDBz = vs.Round(SDBz)
    	vs.SetRecord(SDBH, 'DB-BAUTEILKUERZEL')
    	vs.SetRField((SDBH),'DB-BAUTEILKUERZEL','01 Bauteilkuerzel',(vs.Concat(SDBx,'-',SDBy,'-',SDBz)))
    
    vs.ForEachObject(parentobjectcheck,"(INSYMBOL & INOBJECT & INVIEWPORT & (PON='Break Opening CW'))")

     

    void-dimensions.zip

  6. Hi,

     

    our actual Data Manager - data mapping schemes are full of non symbols (must be more than 300)

    Whenever I load the scheme in a new file, all of these symbols come in the vwx file datamanager, as well, and there is no way to clean that list.

     

    (except of editing the data mapping scheme in an editor like visual studio code)

     

    Can I do sth more efficient?

     

    WHAT???

     

    2092912499_Bildschirmfoto2022-06-20um17_55_33.png.f2f6264458513de84963dcfd5689f791.png

  7. ah, now I found, what you were talking about. Since keyboard-shortcuts make me save time and look way cooler using my computer I don't wanna miss "use keyboard navigation to move focus between controls".

    Using dialogues and being able to switch options with tab keys is such a time saver and after getting used to it is way smoother than using the mouse arrow (and makes you look way cooler, using your computer!).

×
×
  • Create New...