• Dieses Forum ist die maschinengenerierte Übersetzung von www.cad3d.it/forum1 - der italienischen Design-Community. Einige Begriffe sind nicht korrekt übersetzt.

Schalten Sie Parameter zur Blockierung mit VLisp

  • Ersteller Ersteller Dr.Lube
  • Erstellt am Erstellt am

Dr.Lube

Guest
Hallo, alle!

nach 700++ Codezeilen Ich bin gekommen, um die Grafik Teil meines Programms zu entwickeln!! :cool:

Ich fragte mich, ob es möglich wäre, einen Block durch Schaltparameter automatisch einzufügen (Parameter, die sonst beim Betreten des Blocks erforderlich wären).
Konkret spreche ich von der Flagge "Position", die ein Blocklabel ist. Ich möchte auch den Anzeigetyp einstellen.

Kannst du das tun? Wie?
2015-02-16 14_58_17-Autodesk AutoCAD 2015 - [blocchi 10.02.2015.dwg].pngDank allen:)
 
ho trovato qualcosa qui: http://www.cad3d.it/forum1/threads/13281-valori-di-un-blocco-dinamicoCommunque ho ein Problem:
Code:
(vl-cmdf "_.-insert" nome_pil punto_ins "" "")
(setq obj (entlast)
Vereinigtes KönigreichVorschaltgerät nur funktioniert, wenn ich den Debug mache (es nimmt den gerade eingefügten Block), wenn ich die Lisp ohne die Schritt-für-Schritt-Operationen starten, nimmt es mich ein weiteres Objekt. .

Verwendung
Code:
(Befehl "_-insert" name_pil point_ins "" "")
Ich verstehe:
befehl: ; fehler: autocad befehl verweigert: "_.-insert"
Wo bin ich falsch?
 
er provato con entmake
Code:
(entmake)
(Liste)
(cons 0 "Insert")
(cons 2 nome_pil)
(cons 10 punto_ins))

2015-02-18 12_55_58-Errore di AutoCAD - Operazione interrotta.png :cool:
 
hat beides. Ich dachte schon. Ich habe bereits alle Attribute gesetzt und dann gehen, um sie mit vla-set zu ändern. Ebenso gehe ich, um die dynamischen Parameter des Blocks zu ändern.. Aber ich habe ein Problem auf dem Vorschaltgerät, das nicht den gerade eingefügten Block nimmt (dies ist am Ende der Funktion gezeichnet)
 
Okay! über die "elockviolation" verstanden, war es notwendig, den Knopf in "asynchron" auf dlc-studio zu setzen.

jetzt, wie ich die Enmake
Code:
(sing)
(Liste)
(cons 0 "Insert")
(cons 2 name_pil)
(cons 66 1); es gibt Attribute
(cons 10 point_ins)
Jetzt muss ich verstehen, wie man diese Attribute setzt
2015-02-18 16_30_04-Gestione attributi blocco.pngscheint ohne Attribute mit der wie oben geschriebenen Entmake erstellt zu werden:
Code:
(vlax-dump-object obj t)

; iacadblockreferenz: interfaccia autocad block reference (riferimento di blocco)
; valori della proprietà:
; Anwendung (ro) = #<vla-object 0000000140179110="" iacadapplication="">; Dokument (ro) = #<vla-object 0000000029c228e8="" iacaddocument="">; effektivename (ro) = "pilastro rettangolare"
; Körpertransparenz = "dalayer"
; Griff (ro) = "88953"
; hasattributes (ro) = -1
; hasextensiondictionary (ro) = 0
; Hyperlinks (ro) = #<vla-object 00000000368a5648="" iacadhyperlinks="">= (-39.6204 2.15105 0.0)
; Einheiten (ro) = "metri"
; Insunitsfactor (ro) = 1,0
; isdynamicblock (ro) = -1
; Schicht = "cb_testi"
; Linientyp = "Bylayer"
= 1,0
= -1
; Material = "Bylayer"
; Name = "pilastro rettangolare"
; normal = (0.0 0.0 1.0)
; objektiv (ro) = 53
; Objektname (ro) = "acdbblockreference"
; besitzermäßig (ro) = 47
; plotstylename = "colore_ 1
= 0,0
; truecolor = #<vla-object 00000000395eae90="" iacadaccmcolor="">; sichtbar = -1
; xeffektive Skalenfaktor = 1,0
; xscalefactor = 1,0
= 1,0
; yscalefactor = 1,0
= 1,0
; zscalefactor = 1,0
; Metodi supportati:
, Arraypolar (3)
; Arrayrecteckig (6)
; Converttoanonymousblock ()
; Konverterblock (1)
; Kopie (
; löschen ()
; explodieren (
; </vla-object></vla-object></vla-object></vla-object>[B][COLOR="#FF0000"]Getattribute[/COLOR][/B]; getboundbox (2)
; getconstantattributes ()
; [COLOR="#FF0000"][B]getdynamicblockproperties ()[/B][/COLOR]; getextensiondictionary ()
; getxdata (3)
; Highlight (1)
; kreuzen mit (2)
Spiegel (2)
Spiegel (3)
, bewegen (2)
; Resetblock ()
, rotieren (2)
rot3d (3)
; Skalierbarkeit (2)
; setxdata (2)
; transformby (1)
; Aktualisierung ()
t
tatsächlich mit:
Code:
(setq attr (vlax-invoke obj 'getattributes))
ottengo eine schöne Nil
 
Ich setze das Beispiel meines Blocks mit Attributen:
Code:
 (entmake (list (cons 0 "insert")(cons 100 "acdbentity")(cons 67 0)(cons 410 "model")
(cons 8 "riga_7")(cons 100 "acdbblockreference")(cons 66 1)(cons 2 num_b)
(Cons 10:bb)(Cons 41(1)Cons 42(1)Cons 43(1))


(falls (= r_6_com 1)
(entmake (list (cons 0 "attrib")(cons 100 "acdbentity")(cons 8 "riga_7")
(Cons 100 "acdbtext")(Cons 10 (list 0.4 0.5 0))(Cons 40 0.4)(Cons 41 0.85)
(cons 1 r6) (cons 7 "punto") (cons 100 "acdbattribute")
(cons 2 "descr") (cons 70 1) (cons 39 0)
)


(entmake (list (cons 0 "attrib")(cons 100 "acdbentity")(cons 8 "punto-numero)
(Cons 100 "acdbtext")(Cons 10 (list 0.4 0.5 0))(Cons 40 0.4)(Cons 41 0.85)
(cons 1:r7) (cons 7 "punto") (cons 100 "acdbattribute")
(cons 2 "num_p") (cons 70 1) (cons 39 0)

(entmake (list (cons 0 "seqend")))

)
Hinweis: In meinem Fall (cons 70 1) setzt das unsichtbare Attribut ein
 

Statistik des Forums

Themen
58.521
Beiträge
499.056
Mitglieder
104.110
Neuestes Mitglied
ChristianR

Zurzeit aktive Besucher

Keine Mitglieder online.
Zurück
Oben