Sam Jones Posted June 23, 2001 Share Posted June 23, 2001 I want to make a symbol from a collection of selected drawing objects and then enter the symbol definition and attach a record to the symbol definition and enter some default values. I was able to do this in VW 8.5 with the VS chunk below TypeString := StrDialog('Fixture Default Type',''); WattageString := StrDialog('Fixture Default Wattage',''); DoMenuTextByName('Create Symbol',0); SymbolHandle := ActSymDef; SetRecord(SymbolHandle, 'Fixture Data'); SetRField(SymbolHandle, 'Fixture Data','Type',TypeString); SetRField(SymbolHandle, 'Fixture Data','Wattage',WattageString); In VW 9.0, this no longer works. It seems that the symbol is not created until the completion of the script, so the SymbolHandle equals nil and nothing gets assigned. Is there anyway to do this? Quote Link to comment
Fuge Posted August 3, 2001 Share Posted August 3, 2001 Sam, I gave this a try and it worked for me? It assumes the Fixture Data record format already exists. ------------------------------ Procedure Test; Var TypeString,WattageString:STRING; SymbolHandle:HANDLE; begin TypeString := StrDialog('Fixture Default Type',''); WattageString := StrDialog('Fixture Default Wattage',''); DoMenuTextByName('Create Symbol',0); SymbolHandle := ActSymDef; SetRecord(SymbolHandle, 'Fixture Data'); SetRField(SymbolHandle, 'Fixture Data','Type',TypeString); SetRField(SymbolHandle, 'Fixture Data','Wattage',WattageString); end; run(Test); 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.