Jump to content

avictorgm

Member
  • Posts

    34
  • Joined

  • Last visited

Posts posted by avictorgm

  1. Hi, no idea what means that of connected.

     

    the 2021 license no need upgrade to be used.

    the upgrade cost around 900€\$.

     

    Vectorworks reseller will tax the transaction, I already have asked how much?

    I have found that was around 200£ in 2019.

     

    I would like to receive 3500.

    so at the end you save around 40% cost of a new license

  2. In other Topic you got me on the way to read the value of the databank of a symbol.

     

    Now the problem is exactly the contrary.

     

    I want to create a new symbol with 200 written in the textfield, but comes 60!

     

     

    Lasten = 200Kg

     

    the databank is named: "LOADS_DB"

    The field of the databank is named: "Lasten"

     

     

    but somehow that leaves  another totally different number in the field Lasten---> 60

     

    I feel the problem is in the last line of code.

     

    Any help?

     

    image.thumb.png.977489aa20b4131e8b018250127a57b6.pngimage.thumb.png.0a56a2bca5e7ca1289dc67579b95caf0.png

    
    vs.SetRField(SYMBOLO2,'LOADS_DB','Lasten', vs.Num2StrF(Lasten2))

     

     

     

     

    image.png

    image.png

  3. At the end

     

    I GOT IT!!!!

     

    Took me a little, but after this a whole world of possibilities has opened to me!

    import vs
    #Vistor Garzon 2020 based on the work of
    # ©MaKro - June 2018 ;-)
    
    
    H1 = vs.FSActLayer()
    H2 = vs.ActSymDef(H1)
    
    recname = vs.GetName(H2)  # Name of PIO in InfoPalette
    Rec_Name = vs.GetObject(recname) 
    fld = vs.GetRField(H1,'loads-roof','Deckenlast')
    
    ##### vs.GetRField(h,'DatabankName','FieldName')
    
    vs.AlrtDialog(fld)

     

    ReadDAtabankField.jpg

  4. Hi,

    My Name: Victor

    My Skills: Python, Excel Makros, BIM expert...

    My experience: Besides, GIS and Statik Engineering--> 4 years Event engineering using spotlight

     

     

    Examples of my Scripts:

    1) A script that substitute one specific symbol for a custom group of simbols depending of the position.

     

    2) Another that check every layer looking for an specific symbol name to check how many exist in layers with specific names.

         On that way you avoid to add hundred exceptions to the Material List.

     

    3) Another that creates several layout layers  around the exact coordinates of an area.

         Each one with different selection of classes and layers.

         So, for example: the first has only the forest layers on, with classes of animals off.

                                       the second one can be the layers with the word "water" in the name.

     

    4) Layer Creator, I mean, with one click you can create several layers with specific extension names based on the first given name/code.

     

     

    5) Automatic measuring of simbols. very usefull if you have 50 simbols inside an area and have no time to loose clicking, and clicking, and clicking...

     

     

     

     

     

     

     

  5. Hello,

     

    No way to rename objects (rectangle or polygons) with:

    Even with 3D polygons the problem is the same.

     

    But If the element is a sphere it works. Why?

     

    vs.SetName()

    import vs
    
    
    ObjectName = vs.GetName(vs.FSActLayer())
    vs.AlrtDialog(str(ObjectName))
    
    SName = 'Fred'
    points = [0,0,-0.5,1,0.5,1.5,2,1,1,-0.5,0,0]
    h1 = vs.Poly(*points)
    vs.SetName(h1, SName)
    import vs
    
    X1 = 100
    Y1 = 150
    X2 = 0
    Y2 = 500
    NombreStand = 'Nombre'
    
    
    SName = vs.Concat(NombreStand)
    h = vs.Poly(0,0,X1,Y1,X2,Y2,0,0)
    
    h1 = vs.SetPolyClosed(h, 1)
    
    h2 = vs.MakePolygon(h1)
    
    vs.DSelectAll()
    
    vs.SetName(h2, SName)

     

    This one works perfect!

    import vs
    
    
    ObjectName = vs.GetName(vs.FSActLayer())
    vs.AlrtDialog(str(ObjectName))
    
    SName = 'Fred'
    h1 = vs.CreateSphere(0, 0, 0, 1000)
    vs.SetName(h1, SName)

     

    I am wondering if the problem is that are 2D elements, (that has no sense at all)

  6. Hello people, 

     

    I just edit because I found this way.

     

    import vs
    import os
    
    Vendor = 'ACME'
    Price = 123.45
    Tax = 1.07
    
    fileName = 'Classes.txt'
    
    
    def Example():
    	vs.GetFile(fileName)
    	if not vs.DidCancel():
    		vs.Rewrite(Vendor, 0)
    		#vs.WriteBin(Vendor)
    		#vs.WriteMac(Vendor)
    		#vs.WriteLnMAC(Vendor)
    		#vs.Write(Vendor)
    		vs.Close(fileName)
    
    Example()

     

     

     

    But, the next attributes get this message:   "AttributeError: module 'vs' has no attribute 'WriteBin'. "

     

    -vs.Write

    -vs.WriteLnMac

    -vs.WriteBin

    -vs.WriteMac

     

    With write I don't get error, but also no result.

    -vs.Rewrite

     

     

  7. import vs
    X1 = -3000
    Y1 = -1500
    vs.DSelectAll()
    vs.MoveTo(X1,Y1+18.5) #Move the pointer to
    vs.PenSize(10) #outside line of the box
    
    
    def Texto():
        vs.TextRotate(271) 
    
        vs.TextSize(12)
        
        vs.TextJust(1) #Left    1, Center    2, Right    3
        vs.TextVerticalAlign(3) #Leading / space,     Constant Single space    2 ,1 1/2     3 , Double space    4
        
        #colorIndex = vs.RGBToColorIndex(1, 45, 23)
        #vs.TextBack(colorIndex) # using Color Index values
        
    #vs.OpacityN(100, 100) #vs.OpacityN(fillOpacity symbol include, penOpacity)
    #vs.PenSize(24) # DEFINIR GROSOR DE LINEA EXTERIOR DE RECTANGULO
    #      1 = 0,03
    #    X = 0,025 * X
    #   8 = 0,20
    #    24 = 0,6
        #vs.SetStaticTextStyle(3)
        vs.TextFont(vs.GetFontID('Times'))
        #vs.TextStyle(3)
        #vs.FillPat(1)
        #vs.FillBack(126)
        vs.PenPat(1) # Change for the document
        vs.FillBack(7) # Change background color for the document but not of the text
        vs.PenFore(120,0,0) #Change text color of fixed text to Purple 
        vs.FillPat(53)
        vs.PenBack(0,255,0)
        #vs.FillPat(1)
        #vs.FillFore(0,0,255) # Blue
        
        
    Texto()
    h = vs.CreateText(str("Motor ") + str(X1) + str(", ") + str(Y1))
    #    -1 = linienart
    #    0 = linea invisible o vacia / Leer
    #    1 = solid
    #    2 = ?
    #     3 = muster / estampado
    #    4 =  ?
    #    5 = ?
    
    #vs.PenFore(123)
    #vs.FillPat(53)
    # 0 = empty
    # 1 = solid
    # 2 = 
    # x = count number in the table of examples
    # 21 = small squares
    #vs.Rect(X1+150,Y1+200,400,500)

    Hello

    I have tried many options to change the attributes of  the static text to purple text and back color red.

    I got half, the text color.

     

    I can even change the color of the background of the document.

     

    But somehow the pattern of the background stays in empty option for the text.

     

    What small line of text am I missing?

×
×
  • Create New...